2010-04-02 09:52 AM
Unique Serial Number
2011-05-17 04:45 AM
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? -Clive2011-05-17 04:45 AM
Hi Clive,
thanks do you know where I can find out how to retrieve the unique serial number of the chip in software?
Regards,
2011-05-17 04:45 AM
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]2011-05-17 04:45 AM
''Can we program a memory location in the STM32 during gang programming?''
What do you use for the ''gang programming''?