cancel
Showing results for 
Search instead for 
Did you mean: 

How to check if ROM is okay on STM32F030

Shreyas2415
Associate II

ROM Check on STM32F030

I have an STM32F030 where my product has a requirement to do a ROM check before performing any task. How can I do it? Is there any API which returns the result of ROM check done in bootloader? What’s the easiest way of achieving this? I know I can do a CRC check and stuff. But I don’t want to waste my code space doing all the math! Anyway around it?

4 REPLIES 4
Ozone
Lead

The System ROM ? What value should that have ?

Neither can you change it, nor do you need it in normal operation.

Hi @Ozone​ 

Well I am working on a medical product and these requirements come from IEC62304. Yes, I mean the System ROM and the Application Program Space(Code ROM). So Ideally we program our software using SWD and on boot up we want to check if the ROM is functional. If the ROM is dysfunctional, we have to power off the device and not perform any tasks. Is it possible or CRC is the only way out?

> Yes, I mean the System ROM and the Application Program Space(Code ROM).

I do something similar, according to IEC61508 for heavy machinery.

But the MCU-internal ROM is never executed while safety requirements apply, thus the system ROM is not checked.

The application code (and only the application code, not our second stage bootloader) is checked regularly once every 500ms.

The CRC over the application code as calculated, and compared with a precalculated CRC (which is, of course, not included).

Not sure about your medical product and IEC norm, but checking unused things makes no sense to me ...

Since the system ROM is pre-programmed by ST, supposedly real ROM (not Flash), you might need a precalculated CRC from ST.

I think the OP is talking about application software in FLASH.

If the requirements specify a CRC, or sum of some type not sure what.the dithering is about. Most of the STM ​have a CRC peripheral you just shovel data into, others have HASH hardware.

A​ correctly set CRC will drop a zero remainder over the protected area.

Something where liability and modification is an issue, might use elliptic curve signing methods with a private key.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..