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

有帮助吗?

解决方案 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.


其他提示

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.
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top