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.

F28M35H52C: C28 CSM issue - Why unsecure memory can access secure memory

Part Number: F28M35H52C

Hello Champs,

Customer is using F28M35.

For C28 codes, they programmed the password and also added below settings according to TRM to make sure re-secure:

volatile int *CSMSCR = 0x00AEF; //CSMSCR register

//Set FORCESEC bit

EALLOW;

*CSMSCR = 0x8000;

EDIS;

But they found that executing the codes which were copied from flash into unsecure RAM S0 still can access the functions defined in the codes which were copied from flash into secure RAM L0. They didn't do any unlocking operation and C28 was always in lock status. 

Would you please kindly help? Why can the codes in unsecure memory(RAM S0) access the secure memory? Thanks!

Best Regards,

Linda

  • Hi Linda,

    Would you please kindly help? Why can the codes in unsecure memory(RAM S0) access the secure memory

    What is the meaning of "access" the secure memory here? Is it calling the function which is in secure memory or having read/write access to secure memory. Please note that code in unsecure memory can call a function which is in secure memory. That is allowed. If it's read/write access then I would think it's not secure.

    Regards,

    Vivek Singh 

  • Hello Vivek,

    Thank you for your kind help.

    Customer found that code in unsecure memory can call a function which is in secure memory. So this is allowed. Understood.

    As you said " If it's read/write access then I would think it's not secure", does it mean unsecure memory cannot read data from or write data to secure memory if the device is secured? Thanks!

    Best Regards,

    Linda

  • As you said " If it's read/write access then I would think it's not secure", does it mean unsecure memory cannot read data from or write data to secure memory if the device is secured? Thanks!

    Correct. Function calls are allowed but READ/WRITE to secure memory by code running from unsecure memory is blocked.

    Regards,

    Vivek Singh

  • Hello Vivek,

    It's clear. Thank you so much for your kind help.

    Best Regards,
    Linda