cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f100 Flash Programming strangeness

acihana
Associate II
Posted on August 06, 2012 at 14:38

Hi,

Now I'm using a stm32f100c4t6b processor for an application. The proccessor has 16KB memory. I saved my data like that;

#define StartAddr  ((u32)0x08007C00)

#define EndAddr    ((u32)0x08008000)

#define FLASH_PAGE_SIZE    ((u16)0x400)

and I read the data via serial port. No problema.

Strangeness is that EndAddr means 32 KB, my processor has 16KB memory (0x4000) but code is working good. What's my fault? Do you have any idea?
3 REPLIES 3
Posted on August 06, 2012 at 15:47

Do you have any idea?

ST make a finite number of different STM32 die, these are packaged and marked differently depending on the features tested, and how many from each category marketing wants to sell. Realistically they don't make a 16 KB flash part, it probably has 32 or 64KB, the time on the tester can be significantly reduced by not bothering to test it all. General rule, don't use what's not tested, or specified to work. See what the system memory says.

printf(''STM32 %d KB FLASH, %d KB RAM

'',
*((unsigned short *)0x1FFFF7E0),
*((unsigned short *)0x1FFFF7E2));

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
emalund
Associate III
Posted on August 06, 2012 at 15:59

Strangeness is that EndAddr means 32 KB, my processor has 16KB memory (0x4000) but code is working good. What's my fault? Do you have any idea?

you are playing with fire

it is quite common for semiconductor manufactreres to take a part with 64k that in test fail at, say, address 0x8007124 but otherwise works and label it a 16k part

Erik
acihana
Associate II
Posted on August 06, 2012 at 17:23

Thanks for replies, you're right, according to ''

*((unsigned short *)0x1FFFF7E0)

'' it says 32 KB. But I will not playing with fire :)