2021-01-27 02:02 AM
We have PCB assemblies built that contain STM324L7 with 1M and 2M flash memory. How can we determine the flash memory size using a JTAG connection (e.g. by reading a register value)?
Solved! Go to Solution.
2021-01-27 03:27 AM
Found it...
Flash size is part of the Device Electronic signature (section 58 of the reference manual). Details on the MCU Device ID Code is in Debug Support, section 57.
2021-01-27 02:20 AM
The title says L4, but the text says L7 - so which is it?
Have you looked in the datasheet for registers which may either tell you directly, or identify the chip so that you can work it out?
EDIT
Actually, in ST's documentation structure, it would probably be in the Reference Manual, rather than the datasheet.
2021-01-27 02:43 AM
Most, if not all STM32 have a chip size register. From the type of STM32 you have, get the address of that register and read it.
2021-01-27 03:27 AM
Found it...
Flash size is part of the Device Electronic signature (section 58 of the reference manual). Details on the MCU Device ID Code is in Debug Support, section 57.
2021-01-27 04:02 AM
Excellent: so you can select that as the 'Best' answer - which flags the thread as 'Answered'.
2021-03-23 06:00 AM
@CWedg.1 I am facing the same issue here. I have 2 STM32L4 with 128MByte and 256MByte flash size respectively in the same system and want to differentiante using the memory size. How did you succeed in reading the memory size? Using the flash size data register? Thanks for any help