cancel
Showing results for 
Search instead for 
Did you mean: 

Unique Serial Number

ngaylard2
Associate II
Posted on April 02, 2010 at 18:52

Unique Serial Number

4 REPLIES 4
Posted on May 17, 2011 at 13:45

The STM32 has a unique number encoded in it. Is this usable, or do you need something sequential or under your control?

Low cost implies you need to write it yourself, pretty sure commercial grade programmers have a serialization options.

You could write a PC based programming application that uses the built in boot loader over a serial port to flash your main firmware, any configuration/calibration data, and serial numbers into memory. These may exist in different memory regions depending on how you want to set things up. If the firmware is checksummed you will need to put the serial number outside. You could also put a searchable pattern in the firmware and replace it with a serial number during programming, and re-checksum the image.

You could have a debug monitor on the STM32 with commands to program and/or retrieve serialization information.

How do you want to program the device JTAG, Serial?

Can you control the BOOT pins in your production environment?

-Clive

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ngaylard2
Associate II
Posted on May 17, 2011 at 13:45

Hi Clive,

thanks do you know where I can find out how to retrieve the unique serial number of the chip in software?

Regards,

Posted on May 17, 2011 at 13:45

Based on some older ST docs I have this. As I recall the unique number is based on die position (on wafer), wafer lot, and some other information. I'd bet the ''ROM'' is a small factory written FLASH bank.

-Clive

    printf(''STM32 %d KB FLASH, %d KB RAM, %08X-%08X-%08X UNIQUE\r\n'',

        *((unsigned short *)0x1FFFF7E0), // Flash in KB

        *((unsigned short *)0x1FFFF7E2), // RAM in KB

        *((unsigned long *)0x1FFFF7E8), // Unique[0]

        *((unsigned long *)0x1FFFF7EC), // Unique[1]

        *((unsigned long *)0x1FFFF7F0) ); // Unique[2]

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on May 17, 2011 at 13:45

''Can we program a memory location in the STM32 during gang programming?''

What do you use for the ''gang programming''?