cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L011D4P6 chip not programming after first 8K

Rhodes.Keith
Associate II
Posted on November 21, 2016 at 23:09

Hi,

This CPU has 16K of flash and I can only program the first 8K. I'm using a Segger JLink probe on a custom circuit board and Atollic truestudio. I can program the first 8K properly, but the 2nd 8K won't change from a value of 0.

The Segger logs show that it is writing the proper values past the 8K boundary.

The linker script for truestudio has the correct part and indicates it has 16K of flash.The binary generated by truestudio is correct also.

Since the segger log shows the proper values being written, I'm thinking there is something going on with the CPU.

Has anyone run into this before? Is there something I need to do to enable the 2nd 8K of flash for use?

Thanks...Keith Rhodes

#stm32l011-flash
8 REPLIES 8
Posted on November 22, 2016 at 05:06

Sorry not using the L0, but I'd probably double check if there is a Flash size constant in ROM, and then code a quick test to erase/write pages in the second half of the memory space.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on November 22, 2016 at 07:22

I'd try the STLink+STLink Utility combo.

JW
Rhodes.Keith
Associate II
Posted on November 22, 2016 at 12:15

Thanks clive1,

I've never seen this in the STM32F4 or STM32F2. How would I go about finding if there was such a thing?

...Keith

Rhodes.Keith
Associate II
Posted on November 22, 2016 at 12:19

Thanks JW,

Can you provide a bit more info? Are you suggesting I use one of the JLink utilities to try to write to the 2nd 8K? Which utility have you used to do this?

...Keith

Rhodes.Keith
Associate II
Posted on November 22, 2016 at 18:50

It looks like this is a problem with TrueStudio. I can write to the 2nd 8K by using just jlink.exe or jmem.exe.

Working it through with them.

Thanks...

Posted on November 22, 2016 at 20:39

I'd expect it to be in the Reference or Data Manual. On the F2/F4 the FLASH size can be pulled using

unsigned flashsize = *((unsigned short *)0x1FFF7A22);

Jan is suggesting using the ST-LINK, and it's tools, not the J-LINK. This would permit a sanity check using tools more directly from the vendor of the parts.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on November 22, 2016 at 20:45

http://www.st.com/content/ccc/resource/technical/document/reference_manual/21/bd/0f/bd/1c/88/40/f0/DM00108282.pdf/files/DM00108282.pdf/jcr:content/translations/en.DM00108282.pdf

28.1 Memory size register

28.1.1 Flash size registerBase address: 0x1FF8 007CRead only = 0xXXXX where X is factory-programmed

unsigned short flashsize = *((unsigned short *)0x1FF8007C); // Flash in KB (STM32L011)

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Rhodes.Keith
Associate II
Posted on November 22, 2016 at 23:23

Its 0x10, so it looks like a 16k part. I'll continue to pursue with Atollic.

Thanks Clive1