Manufacturing Page#

Provides manufacturing store interface and implementation to store the manufacturing page into the EFR32 flash.

Modules#

Type definitions

Functions#

void
sid_pal_mfg_store_init(sid_pal_mfg_store_region_t mfg_store_region)

Prepare the manufacturing store for use.

void

Deinitialize previously initialized mfg region.

int32_t

Erase the manufacturing store.

bool

Check if the manufacturing store is empty.

int32_t
sid_pal_mfg_store_write(uint16_t value, const uint8_t *buffer, uint16_t length)

Write to mfg store.

void
sid_pal_mfg_store_read(uint16_t value, uint8_t *buffer, uint16_t length)

Read from mfg store.

uint16_t

Get length of a tag ID.

bool

Check if the manufacturing store supports TLV based storage.

uint32_t

Get version of values stored in mfg store.

bool
sid_pal_mfg_store_dev_id_get(uint8_t dev_id[SID_PAL_MFG_STORE_DEVID_SIZE])

Get the device ID from the mfg store.

bool
sid_pal_mfg_store_serial_num_get(uint8_t serial_num[SID_PAL_MFG_STORE_SERIAL_NUM_SIZE])

Get the device serial number from the mfg store.

void
sid_pal_mfg_store_apid_get(uint8_t apid[SID_PAL_MFG_STORE_APID_SIZE])

Get the APID.

void
sid_pal_mfg_store_app_pub_key_get(uint8_t app_pub[SID_PAL_MFG_STORE_APP_PUB_ED25519_SIZE])

Get the Application public key.

Function Documentation#

sid_pal_mfg_store_init#

void sid_pal_mfg_store_init (sid_pal_mfg_store_region_t mfg_store_region)

Prepare the manufacturing store for use.

Parameters
TypeDirectionArgument NameDescription
sid_pal_mfg_store_region_t[in]mfg_store_region

Structure containing start and end addresses of the manufacturing store.

Must be called before any of the other sid_pal_mfg_store functions.


sid_pal_mfg_store_deinit#

void sid_pal_mfg_store_deinit (void )

Deinitialize previously initialized mfg region.

Parameters
TypeDirectionArgument NameDescription
voidN/A

sid_pal_mfg_store_erase#

int32_t sid_pal_mfg_store_erase (void )

Erase the manufacturing store.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Because the manufacturing store is backed by flash memory, and flash memory can only be erased in large chunks (pages), this interface only supports erasing the entire manufacturing store.

Note

  • This function is only supported for diagnostic builds.

Returns

  • 0 on success, negative value on failure.


sid_pal_mfg_store_is_empty#

bool sid_pal_mfg_store_is_empty (void )

Check if the manufacturing store is empty.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Note

  • This function is only supported for diagnostic builds.


sid_pal_mfg_store_write#

int32_t sid_pal_mfg_store_write (uint16_t value, const uint8_t * buffer, uint16_t length)

Write to mfg store.

Parameters
TypeDirectionArgument NameDescription
uint16_t[in]value

Enum constant for the desired value. Use values from sid_pal_mfg_store_value_t or application defined values here.

const uint8_t *[in]buffer

Buffer containing the value to be stored.

uint16_t[in]length

Length of the value in bytes. Use values from sid_pal_mfg_store_value_size_t here.


sid_pal_mfg_store_read#

void sid_pal_mfg_store_read (uint16_t value, uint8_t * buffer, uint16_t length)

Read from mfg store.

Parameters
TypeDirectionArgument NameDescription
uint16_t[in]value

Enum constant for the desired value. Use values from sid_pal_mfg_store_value_t or application defined values here.

uint8_t *[out]buffer

Buffer to which the value will be copied.

uint16_t[in]length

Length of the value in bytes. Use values from sid_pal_mfg_store_value_size_t here.


sid_pal_mfg_store_get_length_for_value#

uint16_t sid_pal_mfg_store_get_length_for_value (uint16_t value)

Get length of a tag ID.

Parameters
TypeDirectionArgument NameDescription
uint16_t[in]value

Enum constant for the desired value. Use values from sid_pal_mfg_store_value_t or application defined values here.


sid_pal_mfg_store_is_tlv_support#

bool sid_pal_mfg_store_is_tlv_support (void )

Check if the manufacturing store supports TLV based storage.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Note

  • This function only indicates that the platform supports TLV, but the device may have storage with fixed offsets that was flashed during production.


sid_pal_mfg_store_get_version#

uint32_t sid_pal_mfg_store_get_version (void )

Get version of values stored in mfg store.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Note

  • Functions specific to Sidewalk with special handling The version of the mfg values is stored along with all the values in mfg store. This API retrieves the value by reading the address at which the version is stored.


sid_pal_mfg_store_dev_id_get#

bool sid_pal_mfg_store_dev_id_get (uint8_t dev_id)

Get the device ID from the mfg store.

Parameters
TypeDirectionArgument NameDescription
uint8_t[out]dev_id

The device ID


sid_pal_mfg_store_serial_num_get#

bool sid_pal_mfg_store_serial_num_get (uint8_t serial_num)

Get the device serial number from the mfg store.

Parameters
TypeDirectionArgument NameDescription
uint8_t[out]serial_num

The device serial number


sid_pal_mfg_store_apid_get#

void sid_pal_mfg_store_apid_get (uint8_t apid)

Get the APID.

Parameters
TypeDirectionArgument NameDescription
uint8_t[out]apid

The apid

Applicable only for products with short form certificate chain.


sid_pal_mfg_store_app_pub_key_get#

void sid_pal_mfg_store_app_pub_key_get (uint8_t app_pub)

Get the Application public key.

Parameters
TypeDirectionArgument NameDescription
uint8_t[out]app_pub

The Application public key

Applicable only for products with short form certificate chain.