I've found out putting the pio_set_value(< pin name >, < output level >); as first in the hw_init function in the boards .C file sets the output successfully.
How to set GPIO output in/during AT91bootstrap?
-
05-10-2022 - |
Question
I'm using Arm9 Atmel Sam9G25 with this Startup sequence : RomBOOT -> At91Boostrap -> U-Boot-> Linux
Because i want to measure the startup time I'd like to set a GPIO output when entering Bootstrap to 1 and setting the same Pin to 0 when entering the userspace.
I already implemented the sserspace setting but unfortunately I can't figure out, how to set those GPIO Pins in Bootstrap. Can anyone help me where to have an eye on ? Those search engines didn't help.
thank you
Solution 2
OTHER TIPS
Read the data sheet for your microcontroller. You'll probably need to:
- Enable power to the GPIO peripheral block that includes the GPIO pin in question.
- Configure the GPIO pin for it's GPIO purpose (as opposed to another multiplexed peripheral).
- Configure the Data Direction register to make the GPIO pin an output.
- Configure any internal pull-up/pull-down resistor and/or drive strength for the GPIO pin appropriately (maybe optional).
- Set the GPIO pin's Data register to set the pin high.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow