ST MCU (JSAPI_ST_MCU)

These functions are available on all ST MCUs supported by JumpStart API. More functions might be added in future JSAPI releases.

Object

extern JSAPI_ST_MCU jsapi_st_mcu;

Return the ST unique ID

void UniqueID_96bits(unsigned id[3]);

Return a unique ID derived from the 96-bit ID. Not truly unique, but should be "good enough" in most cases

void UniqueID_32bits(unsigned id[1]);

Return a unique ID derived from the 96-bit ID. Similar to the DFU ID and not truly unique, but should be “good enough" in most cases

void UniqueID_48bits(unsigned short id[3]);

 

UniqueID_96bits returns a 96-bit integer (three 32-bit values) that is guaranteed by ST to be unique of all such values returned by the ST MCU. The other two routines reduce the sizes of the value, but should still be “unique enough”.

Example

// use the 32-bit ID as seed to rand()

unsigned myid;

 

jsapi_st_mcu.UniqueID_32bits(&myid);

srand(myid);