Hi,
I want to make a secure bootloader, that receives encrypted data, decrypt it and updates the device. So far this works fine, but now I want to protect the memory from non-authorized access.
Lets say the bootloader is at the beginning of the flash in sector 0 and the app is in the following 14 sectors. At beginning, the bootloader starts and looks, if the header of the firmware is correct and if not, it erases the whole 14 flash sectors and waits over SCI for an update. I want to prevent, that any flash memory can be read out from the outside, since the bootloader contains the decryption key and the firmware should be protected. How can I achieve this? Especially, how can I let the bootloader have access to write a new firmware into the flash, but the flash is not accessible from the outside?
I have done this many times on a STM32 uC, there was the possibility for the memory protection unit, that could be deactivated by the bootloader when an authorized firmware was received for flash writing and also the RDP (read out protection) flash could be set, to disable the read out from the outside.
I have already found the following security features document from TI: https://www.ti.com/lit/an/swpb019d/swpb019d.pdf?ts=1656748079556&ref_url=https%253A%252F%252Fwww.google.com%252F
So I think, the RDP feature is the same as the JTAGLOCK, right? And in point one there is stated, that it is possible to protect memory blocks, but not how to do this?