libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
desig.c File Reference
Include dependency graph for desig.c:

Go to the source code of this file.

Functions

uint16_t desig_get_flash_size (void)
 Read the on board flash size. More...
 
void desig_get_unique_id (uint32_t *result)
 Read the full 96 bit unique identifier Note: ST specifies that bits 31..16 are also reserved for future use. More...
 

Function Documentation

◆ desig_get_flash_size()

uint16_t desig_get_flash_size ( void  )

Read the on board flash size.

Returns
flash size in KB

Definition at line 24 of file desig.c.

References cm3_assert_not_reached, DBGMCU_IDCODE, DBGMCU_IDCODE_DEV_ID_MASK, DESIG_FLASH_SIZE_BASE_449, DESIG_FLASH_SIZE_BASE_451, and DESIG_FLASH_SIZE_BASE_452.

◆ desig_get_unique_id()

void desig_get_unique_id ( uint32_t *  result)

Read the full 96 bit unique identifier Note: ST specifies that bits 31..16 are also reserved for future use.

Parameters
resultpointer to at least 3xuint32_ts (96 bits)

Definition at line 48 of file desig.c.

References cm3_assert_not_reached, DBGMCU_IDCODE, DBGMCU_IDCODE_DEV_ID_MASK, DESIG_UNIQUE_ID_BASE_449, DESIG_UNIQUE_ID_BASE_451, and DESIG_UNIQUE_ID_BASE_452.

Referenced by desig_get_unique_id_as_dfu(), and desig_get_unique_id_as_string().

Here is the caller graph for this function: