Where's the CRC and the size of the whole firmware application stored whenever a new application is flashed on to the System flash?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-08 1:10 AM
Does the controller perform a CRC confirmation check before running the application to check if the firmware is corrupted? If so, where does this happen; in the bootloader or the application itself? What does it do if the CRC turns out to be wrong? Secondly, I've referred the AN3155 and in that the bootloader expects a packet size to be a multiple of 4 while issuing the Write memory command (2nd note below the Write Memory Command flow on Pg. 19 of AN3155). So what if the overall firmware size is not a multiple of 4? How to handle the last firmware packet transaction?
Solved! Go to Solution.
- Labels:
-
CRC
-
Documentation
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-08 2:08 AM
It doesn't self-check with a CRC.
You'd need to add pad bytes to get word alignment. ​
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-08 2:08 AM
It doesn't self-check with a CRC.
You'd need to add pad bytes to get word alignment. ​
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-08 2:25 AM
Ok. But how does the controller makes sure that the firmware is not corrupted before running the application? What if someone corrupts it on purpose or the firmware update process fails midway? Will it just run the corrupted firmware or generate any Hard Fault?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-08 3:37 AM
The MCU does not check the integrity of the code it is running.
It could crash in any number of ways, a hard Fault is highly probable.
You can create your own loader that runs first and checks integrity / signing of an application image.​
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-08 6:27 AM
That was really helpful sir. Thanks a lot.
