This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

why data can not be wrote into the registers of nRF52840

hello, nordic's engineers, need your help.

  (1) the first problem : can not set VDD output to 3.3V
  From nRF52840_Product_Specification_v0.5, it says:
  High voltage mode is entered when the supply voltage is only connected 

to the VDDH pin and the VDD pin is not connected to any voltage supply. In high voltage mode, the output from REG0 can be used for supplying external circuitry from the VDD pin.

  Our nRF52840  is using  High voltage mode, so nRF52840 is powered by VDDH pin,  

and voltage of VDDH is 5V; Then we set REGOUT0 and EXTSUPPLY like following

  NRF_UICR->REGOUT0 = 5;//3.3V
  NRF_UICR->EXTSUPPLY = 1;//enable
    
  but the output of VDD pin is still 1.8V, why?


  (2)the second problem  :  can't set radio tx power
  we want increase radio tx power, but it seems that the setting does not 

take effect

  source code :  sd_ble_gap_tx_power_set(8);
  

  (3) add debug source code to read back register value, and print:
           NRF_LOG_INFO("NRF_UICR->REGOUT0 %d\r\n", NRF_UICR->REGOUT0);
       NRF_LOG_INFO("NRF_UICR->EXTSUPPLY %d\r\n", NRF_UICR->EXTSUPPLY);
       NRF_LOG_INFO("NRF_RADIO->TXPOWER %d\r\n", NRF_RADIO->TXPOWER);

  debug onformation got form terminal:
        APP:INFO: NRF_UICR->REGOUT0 -1
        APP:INFO: NRF_UICR->EXTSUPPLY -1
        APP:INFO: NRF_RADIO->TXPOWER 0

  oh, my god, The setting data is not written in , why? why? why?

  very strange :
  NRF_UICR->REGOUT0 and NRF_UICR->EXTSUPPLY are 

always -1(default value when power on), NRF_RADIO->TXPOWER is 0(default value when power on) at most of time , but some times is 8(our setting value). image description

  debug information printed to UART:
        APP:INFO: NRF_UICR->REGOUT0 -1
        APP:INFO: NRF_UICR->EXTSUPPLY -1
        APP:INFO: NRF_RADIO->TXPOWER 8
        APP:INFO: NRF_UICR->REGOUT0 -1
        APP:INFO: NRF_UICR->EXTSUPPLY -1
        APP:INFO: NRF_RADIO->TXPOWER 0
        APP:INFO: NRF_UICR->REGOUT0 -1
        APP:INFO:NRF_UICR->EXTSUPPLY -1
        APP:INFO:NRF_RADIO->TXPOWER 0

  
  thank you very much!
Parents
  • OK, I have fixed the problem that "how to set VDD output 3.3V", thanks to the "UICR Config Example."

    need to add a file uicr_config.h to keil project, and add the following two line code to it, finally include it in the file main.c

    const uint32_t UICR_ADDR_EXTSUPPLY attribute((at(0x10001300))) attribute((used)) = 0xFFFFFFFF;//Enabled

    const uint32_t UICR_ADDR_REGOUT0 attribute((at(0x10001304))) attribute((used)) = 0xFFFFFFF5;//3.3V


    for tx power, this is a good answer

    devzone.nordicsemi.com/.../

    The NRF_RADIO register is a restricted resource when you are running a SoftDevice (and I assume you do?). Hence, you can neither read from it nor write to it. The SD blocks the radio as well as some other hardware registers to prevent users to inadvertently change critical parameters during transmissions.

Reply
  • OK, I have fixed the problem that "how to set VDD output 3.3V", thanks to the "UICR Config Example."

    need to add a file uicr_config.h to keil project, and add the following two line code to it, finally include it in the file main.c

    const uint32_t UICR_ADDR_EXTSUPPLY attribute((at(0x10001300))) attribute((used)) = 0xFFFFFFFF;//Enabled

    const uint32_t UICR_ADDR_REGOUT0 attribute((at(0x10001304))) attribute((used)) = 0xFFFFFFF5;//3.3V


    for tx power, this is a good answer

    devzone.nordicsemi.com/.../

    The NRF_RADIO register is a restricted resource when you are running a SoftDevice (and I assume you do?). Hence, you can neither read from it nor write to it. The SD blocks the radio as well as some other hardware registers to prevent users to inadvertently change critical parameters during transmissions.

Children
No Data
Related