Hello,
I am trying to make use of the SW booting (Page 3381 in the TRM) but so far I have not had a lot of luck with it.
What I would like to do is have something like:
- Normally boot from MMC
- If x-load detects some condition, e.g. a button is held down, configure a different boot device using the SW booting configuration, then reset.
So, when x-load detects the right condition:
- Write 0x4800 2920 to 0x4800 2910 (the magic address in the scratchpad)
- At 0x4800 2920, write 0xCF00 AA01 // Magic value from TRM
- At 0x4800 2924, write 0x0000 000C // Size of SW boot structure, again from TRM
- At 0x4800 2928, write 0x0000 0011 // Let's try and boot from USB
- At 0x4800 292C, write 0x0000 0000 // Don't care about 2nd or 3rd boot devices
- At 0x4800 2930, write 0x0000 0000 // Don't care about 4th boot device, and reserved.
- Reset by setting DPPL3 reset in PRM_RSTCTRL
If any one can spot the error in this or has some working code they could share with me I would appreciate it :).
Thank you in advance,
Richard.