XS1-L + OTP AES boot + USB DFU

Technical discussions around xCORE processors (e.g. xcore-200 & xcore.ai).
User avatar
armands117
Member
Posts: 11
Joined: Fri Dec 28, 2012 1:39 am

XS1-L + OTP AES boot + USB DFU

Post by armands117 »

Hi,

After adding an OTP AES boot to my project (that is based mostly on XR-USB-AUDIO-2.0-MC) I discovered that USB DFU works no longer. Debugging revealed that value of variable that holds DFU mode flag (DFU_reset_override) does not survive during reset.
USB DFU worked fine without OTP AES boot. Apparently OTP AES clears RAM before passing control to firmware in flash.
Has anyone came across such an issue? Is there any idea where else (besides RAM) one could squirrel away a flag indicating DFU mode?

Armands


User avatar
lilltroll
XCore Expert
Posts: 956
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Post by lilltroll »

There is instructions to write/read to the registers in the switch, but I do not know if that solves your problem. There is som registers only used for debugging, so they will not be set by other processes during DFU i guess.
User avatar
armands117
Member
Posts: 11
Joined: Fri Dec 28, 2012 1:39 am

Post by armands117 »

lilltroll wrote:There is instructions to write/read to the registers in the switch, but I do not know if that solves your problem. There is som registers only used for debugging, so they will not be set by other processes during DFU i guess.
Thanks, good idea! Values in registers of switch should survive restart of individual core. I will try that.
User avatar
armands117
Member
Posts: 11
Joined: Fri Dec 28, 2012 1:39 am

Post by armands117 »

armands117 wrote:
lilltroll wrote:There is instructions to write/read to the registers in the switch, but I do not know if that solves your problem. There is som registers only used for debugging, so they will not be set by other processes during DFU i guess.
Thanks, good idea! Values in registers of switch should survive restart of individual core. I will try that.
Unfortunately experiments revealed that PSwitch registers are wiped during restart so this is not an option.