cancel
Showing results for 
Search instead for 
Did you mean: 

How can we determine the flash memory size of STM32L4 processors?

CWedg.1
Associate III

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)?

1 ACCEPTED SOLUTION

Accepted Solutions
CWedg.1
Associate III

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.

View solution in original post

5 REPLIES 5

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.

Uwe Bonnes
Principal III

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.

CWedg.1
Associate III

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.

Excellent: so you can select that as the 'Best' answer - which flags the thread as 'Answered'.

@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