cancel
Showing results for 
Search instead for 
Did you mean: 

Question about the self-test of the internal flash memory

Heinz_Baumer
Associate III

Does anyone know what settings are needed to check the internal flash memory using the STL library?

 

I wrote a small test firmware (for a 61508 safety application without TZ) using the STL library, which is supposed to perform a self-test flash memory check.

However, this test always fails.

 

I ran the checksum check using STM32CubeProgrammer v2.20.0.

I had to manually enter the settings for FlashStart, FlashEnd, and FlashSectionSize (0x08000000 0x0800E000 0x00010000) because the macros from the readme file didn't work.

 

The STM32CubeProgrammer then reports: CRCs area injected successfully.

After loading the modified ELF file, the STM32CubeProgrammer displays:

Number of segments: 2
segment[0]: address= 0x8000000, Size = 0xC314
segment[1]: address= 0x800E000, Size = 0x2000

 

But what settings should be specified to perform the flash test?
Unfortunately, this information is not available in the manual or the STL documentation. 

I've already tried the following unsuccessfully:
1st attempt: #define FLASH_SECTION_SIZE 0xE000U
2nd attempt: #define FLASH_SECTION_SIZE 0xC400U
3rd attempt: #define FLASH_SECTION_SIZE 0x10000U
each with: #define TEST_FLASH_SECTION_NB 1


The StlErrorHandler() is always called because the flash check fails.
(FlashTmStatus: STL_FAILED)


Does anyone know what settings need to be changed:
  a) when calling the STM32CubeProgrammer and
  b) for testing the flash
so that it works?

 

 

10 REPLIES 10

Hello @Christophe VRIGNAUD

Many thanks for your help.
Now it is working a little bit.
The firmware has a length of 0xC2F4 bytes.

However, the flashtest only works up to a length of 0xC000 bytes.

If I try to test with a length greater than 0xC000 bytes, I always get an error, although the generated CRC table has entries up to 0xC400.

I've tryed the optional pattern (0xFF) to STM32_Programmer_CLI.exe, but it isn't working.

Any idea?