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.
Is unlocking the CSM through SCI_Boot possible? I reduced my code to only be a call to CsmUnlock() with the correct values hard coded there. I figured this would be small enough to run in M0 and M1. I also used #pragma CODE_SECTION(CsmUnlock, "ramfuncs"); to make sure it would be there. But this doesn't work, because I have to reset the device back into SCI_Boot to upload more code, which I assume gets rid of my unlock procedure.
So I tried just adding CsmUnlock to my normal code, at the point that FlashAPI document says (after setting the Flash_CPUScaleFactor). This also doesn't work.
Before I investigate further, is unlocking through SCI_Boot even possible? If so, does it stay unlocked if the XRS(reset) is pulled low and the device starts back up in SCI_Boot? As in, once unlocked, does it need a power cycle to re-enable the security (like when you set the password).
Daniel,
which device is this for? Please take a look at boot ROM sources in ControlSuite. You will have to implement your own SCI_Boot_from_app function, this function
1.> should get loaded using the ROM SCI_Boot boot mode and at the end of boot this function will be called.
2.> this function once started should call CSM unlock and call back in to ROM functions (code flow will be similar to the ROM SCI_Boot function) .
CSM unlock is possible by SCI_Boot, SCI_Boot doesn;t care which function you are loading in RAM - it loads it and starts it. Now after this funciton unlocks the device the device gets locked again at XRSn or any reset. So you should not pull XRSn - if you follow above approach you will not have to restart the device for SCI_Boot but hte application function that unlocks the device will call back in to ROM loaders to complete the SCI_Boot.
I'm sure it is not as simple as I stated above, but you can try it out. Please let us know if it works for you.
Best Regards
Santosh
This is for a TMS320F2802x.
Thanks for the reply. I already have a program running from RAM through SCI_Boot doing a whole lot of stuff with the flash. I thought adding the CsmUnlock stuff here would solve the issue, but apparently not.
I'll look into your solution. I'm sure it's possible, but I don't have time to try the CSM unlocking just now. At least I know it can work in the future and know that any reset will cause it to re-lock. If I ever implement it, I'll be sure to state how it went.