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.

am335x Reload Sysboot on software reset



Hello,

So I have added a feature to allow the user to change the boot sequence by holding a button during power up.  This works as long as they power the device off then power it on.  However, i have found that when a software reset is performed it does not re-read the sysboot pins and therefore uses the same boot sequence as the last boot.

Is there any way to cause it to re-read the sysboot pins on reset?  Or maybe a way to modify the register that contains these settings?

I am basically using this method to provide a means of restoring the unit to factory so that if the U-Boot in NAND (default boot method) gets corrupt somehow we can restore from uSD.  Since the ROM loader does not perform any sort of verification on the U-Boot image if it sees any data in NAND it will try to boot from it and just hang if its bad.  So using a button to change the sequence so that MMC0 is first allows them to boot from the uSD which then reflashes itself to NAND and restarts.  But since the sysboot pins are not reread on software reset it just continually boots from uSD and restores until the user powers off then back on : /.  If there was either a way to reread the sysboot pins or to modify the value in the register from U-boot this method would then work.

Any advice?

Thanks,

Jarrod

  • Hi Jarrod,

    SYSBOOT pin values are only latched on the rising edge of PWRONRSTn. Please check Table 8-25 in the AM335X TRM Rev. K for details.

  • Thanks!

    That is what i figured, and i see that the boot sequence is stored in control_status and is read-only, so i can't modify the latched values. I was hoping there would be an easy way to modify the boot sequence so i could just issue a reset in software after the restore and use the normal boot method. I guess i will just have to stop after restore and force the user to cycle power. Oh well, that works its just not as nice.

    Thanks,
    Jarrod
  • You can probably have the PMIC perform a power-on reset, either on request via I²C or by going into RTC-only mode with a wakeup scheduled 1 second in the future.

  • Jarrod Cook said:
    That is what i figured, and i see that the boot sequence is stored in control_status and is read-only, so i can't modify the latched values.

    It is actually slightly more complicated: control_status isn't read-only, so you can for example modify it and then re-execute public ROM by jumping to 0x20000 and it'll use the modified boot sequence, but when a reset (other than power-on reset) occurs control_status reverts to the values latched at power-on reset.

  • Sorry for the delayed response, all the notifications were being blocked by my spam filter!

    Thank you for the additional information!  I like the idea of having the PMIC reset everything, I think i will go that route.  It seems like the best solution because it will force a clean reset : ).

    Thanks,

    Jarrod