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

Was it helpful?

Solution 2

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.


OTHER TIPS

Read the data sheet for your microcontroller. You'll probably need to:

  1. Enable power to the GPIO peripheral block that includes the GPIO pin in question.
  2. Configure the GPIO pin for it's GPIO purpose (as opposed to another multiplexed peripheral).
  3. Configure the Data Direction register to make the GPIO pin an output.
  4. Configure any internal pull-up/pull-down resistor and/or drive strength for the GPIO pin appropriately (maybe optional).
  5. Set the GPIO pin's Data register to set the pin high.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top