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.

TMS320F28377D: Calling Boot ROM code with secure stack

Genius 12760 points

Part Number: TMS320F28377D
Other Parts Discussed in Thread: C2000WARE

I have to following issue with the secure mode on the F28377D.

I have enabled the DCSM and secured all my Flash and RAMs. I have allocated my stack to a secure RAM. The AdcSetMode function in F2837xD_ADC.c calls into the TI OTP Flash – functions CalAdcaINL, CalAdcbINL, CalAdccINL, CalAdcdINL, and GetAdcOffsetTrimOTP. I suspect these functions then call into the Boot ROM, though I have not verified this. The Boot ROM cannot be secured. This results in the unsecured Boot ROM functions using a stack in secure RAM - reads from the stack return zero and writes to the stack are ignored.

What strategy do you recommend for calling functions in unsecured memory with a stack in secured RAM. Moving the whole stack to unsecured memory is not really an option – I want my stack secured. My initial idea is to switch to an unsecured stack, with interrupts disabled, for the duration of the function call – I am not calling these unsecured functions from multiple execution contexts so this is safe. Are there any other options available to me, e.g. obtaining the source for those functions stored in unsecured ROM and building them into my secured Flash?

Regards, Bernd

  • Hi,

    My initial idea is to switch to an unsecured stack, with interrupts disabled, for the duration of the function call – I am not calling these unsecured functions from multiple execution contexts so this is safe. 

    On this device, this is good option to use.

    Are there any other options available to me, e.g. obtaining the source for those functions stored in unsecured ROM and building them into my secured Flash?

    As of today source code for these functions are not released but we are planning to release it in future. Our C2000Ware release if done quarterly so it may be available only in next quarter. We don't have exact release date for this yet.

    Regards,

    Vivek Singh