This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Initializing the hardware in asm boot code of boot project



Hi,

We need to do some hardware initialization (for DM6437, on our custom board) in the boot asm code of our boot project. This requirement is born from that we need to toggle GPIO pin of watchdog while copying sections from flash in the boot asm code.

Is there any example? Do you have any suggestions how I can do that??

Erman

  • In general the examples I have seen for booting DM6437 would not be capible of this because they utilize the AIS boot method which means that the code being used to load sections from flash is hard coded into the ROM of the DM6437, and thus could not be modified to manage toggling a GPIO pin during the loading process. This being said you would have to go through an additional stage in your boot process, where you boot a much smaller project at first (boot asm you suggest) that comes up quickly enough to toggle the watchdog, and than that small project would have to load the main project, however I have no examples of this.

  • Why not change the AIS Image around a bit? AIS is cool in that you can embed op codes to write to registers (e.g. SET op code). The secondary boot code is certainly not a bad idea as you can create a simple watchdog 'pet' routine, but the AIS Image could be tweaked to work as well.

  • Thank you for the answers.

    I completed this writing some assembly code in the boot asm file. I initialize the PSC for GPIO module, do the pinmux and then toggle the watchdog gpio pin in the boot asm, the total amount of code was not as large as I though at the beginning. It works fine now. Thanks again.

    Erman