2024-08-08 04:36 PM
Hello,
We have a cybersecurity requirement to protect against unauthorized firmware uploads during data load operations or shop load using JTAG. Is there a feature available in the STM32F7xxx family Microcontroller that complies with cybersecurity standards to prevent unauthorized firmware uploads?
Any guidance or documentation on how to achieve this would be greatly appreciated.
Regards,
-Manju
2024-08-08 05:00 PM
Setting RDP=2 will disable JTAG entirely. That is one way to prevent uploads.
Apart from that, on the F7 series, no not really. If someone has physical access to your device, they can revert RDP to level 0 (if it's at level 1) and upload their own firmware. Nothing you can do about it.
2024-08-09 08:19 AM
Thank you for your reply!
How can I change the RDP configuration level to reprogram the chip via JTAG? Is it necessary to generate an input or configure a GPIO pin (HIGH or LOW) to modify the RDP settings in the firmware to enable or disable JTAG?
I don't think this can be done via JTAG software, as the JTAG pins are disabled when RDP is set to level 2. I believe the only way to change the RDP value is through the software itself.
2024-08-09 09:09 AM
Hello @ManjuMulimani ,
To protect against unauthorized firmware uploads during data load operations or shop load using JTAG the complete solution and the Most appropriate will be SBSFU you can find an example of SBSFU implementation on STM32CubeExpansion_SBSFU_V2.6.2\Projects\STM32F769I-Discovery\Applications you can download the package from this link .
you can find documentation on SBSFU in AN5056 .see also Getting started with the X-CUBE-SBSFU STM32Cube Expansion Package - User manual
you can also follow the online training provided on this solution Security Part6 - STM32 security ecosystem - 03 SBSFU presentation (youtube.com)
you can also visit this wiki page explaining the fundamentals of this solution you will need to get a deep understanding of the full solution and the implementation.
you can also see this following article showing the RDP programming in software How to change the readout protection on STM32F4 - STMicroelectronics Community
let me know if you need more clarifications.
Regards
2024-08-09 10:46 AM - edited 2024-08-09 10:47 AM
Setting RDP to level 2 is done through JTAG/SWD and is a one-way only process. No way of re-enabling it. It can also be done in software but that is not typical.
The real answer here depends on the type of attack you're trying to prevent against.
Are you trying to prevent someone uploading the wrong code unintentionally? SBSFU can help, as can CRC checks or any other number of administrative controls.
Are you trying to prevent someone intentionally uploading the wrong code? Only RDP 2 can help here. But at that point they can just replace the chip with their own, so not much you can do about that anyway.