Skip to main content
acihana
Associate II
August 6, 2012
Question

stm32f100 Flash Programming strangeness

  • August 6, 2012
  • 3 replies
  • 886 views
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?
    This topic has been closed for replies.

    3 replies

    Tesla DeLorean
    Guru
    August 6, 2012
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    emalund
    Associate III
    August 6, 2012
    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
    acihanaAuthor
    Associate II
    August 6, 2012
    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 :)