添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
慷慨大方的蘑菇  ·  What is HSTS and why ...·  1 月前    · 
卖萌的小马驹  ·  七十五载谱华章 ...·  2 月前    · 
绅士的炒饭  ·  Project Beloved — A ...·  9 月前    · 

i am working with nrf52840 sdk16.0 s140

i wish to read the UICR register value like this :

uint32_t serial_number = NRF_UICR->CUSTOMER[0];

but i get this compilation error

5> nrf5-sdk/modules/nrfx/mdk/nrf52840.h:2834:37: error: initializer element is not constant
5> D:\Ziv\projects\Audio_sticker_FW\src\ble_audio_sticker.c:82:26: note: in expansion of macro 'NRF_UICR'
Build failed

since it is a define in the nrf52840.h file it is not a variable that i can initiate, even more i want to flash the UICR with nrfprog or something outside of the code so in production it will be possible to give different uicr to each unit without changing the compiled code

any idea how to solve this issue or what is the cause ?

hope to read from you soon

best regards

This should work fine.

"5> D:\Ziv\projects\Audio_sticker_FW\src\ble_audio_sticker.c:82:26: note: in expansion of macro 'NRF_UICR'"

Have you defined " NRF_UICR" as something else here?

Can you post the code from "ble_audio_sticker.c:82:26" ?