Migrating nRF52840 to nRF52833

Hi DevZone !

I am currently trying to migrate from nRF52840 to nRF52833 because of a backorder problem with the former.

My application consist of a Mesh configurations with the ESB protocole between multiple devices. 

It is using SPIM to read on external devices and RTC to periodically send packets.

I am using the SDKs:

  • nRF5_SDK_15.0.0_prf
  • nRF5_SDK_for_Thread_and_Zigbee_2.0.0_29775ac_min

I am currently trying to program a nRF52833-DK to make some test before implementing it with my real board.

I have already talked to one of your collegues to verify the hardware validity and it seems ok. 

Now, I have been able to program my DK by adding the dependencies of the nRF52833 in my SDK. 

I am not using any softdevice and I use a makefile to compile and program the device.

Now, I can't use my clock or my mesh library to send anything on the ESB protocole. I was wondering what could cause that problem.

Thanks you,

Joel V.

Parents Reply Children
  • Hi Vidar,

    I am not redefining any IRQ handler in my application. Could it be a library I use that have this redefinement ? There is one script I couldn't compile  because of an error with nrf_power.h and I decided to let it down because I don't need the usb in my application and the script was about USB. This is the error :

    In file included from ../../nRF5_SDK_for_Thread_and_Zigbee_2.0.0_29775ac_min/modules/nrfx/drivers/include/nrfx_power.h:45:0,
                     from ../../nRF5_SDK_for_Thread_and_Zigbee_2.0.0_29775ac_min/integration/nrfx/legacy/nrf_drv_power.h:44,
                     from ../../drivers/usb_print.c:10:
    ../../nRF5_SDK_for_Thread_and_Zigbee_2.0.0_29775ac_min/modules/nrfx/hal/nrf_power.h: In function 'nrf_power_dcdcen_vddh_set':
    ../../nRF5_SDK_for_Thread_and_Zigbee_2.0.0_29775ac_min/modules/nrfx/hal/nrf_power.h:998:14: 
    error: 'NRF_POWER_Type {aka struct <anonymous>}' has no member named 'DCDCEN0'; did you mean 'DCDCEN'?
         NRF_POWER->DCDCEN0 = (enable ?
                  ^~
    ../../nRF5_SDK_for_Thread_and_Zigbee_2.0.0_29775ac_min/modules/nrfx/hal/nrf_power.h:999:9: error: 'POWER_DCDCEN0_DCDCEN_Enabled' undeclared (first use in this function)
             POWER_DCDCEN0_DCDCEN_Enabled : POWER_DCDCEN0_DCDCEN_Disabled) <<
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../nRF5_SDK_for_Thread_and_Zigbee_2.0.0_29775ac_min/modules/nrfx/hal/nrf_power.h:999:9: note: each undeclared identifier is reported only once for each function it appears in       
    ../../nRF5_SDK_for_Thread_and_Zigbee_2.0.0_29775ac_min/modules/nrfx/hal/nrf_power.h:999:40: 
    error: 'POWER_DCDCEN0_DCDCEN_Disabled' undeclared (first use in this function)
             POWER_DCDCEN0_DCDCEN_Enabled : POWER_DCDCEN0_DCDCEN_Disabled) <<
                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../nRF5_SDK_for_Thread_and_Zigbee_2.0.0_29775ac_min/modules/nrfx/hal/nrf_power.h:1000:13: error: 'POWER_DCDCEN0_DCDCEN_Pos' undeclared (first use in this function)
                 POWER_DCDCEN0_DCDCEN_Pos;
                 ^~~~~~~~~~~~~~~~~~~~~~~~
    ../../nRF5_SDK_for_Thread_and_Zigbee_2.0.0_29775ac_min/modules/nrfx/hal/nrf_power.h: In function 'nrf_power_dcdcen_vddh_get':
    ../../nRF5_SDK_for_Thread_and_Zigbee_2.0.0_29775ac_min/modules/nrfx/hal/nrf_power.h:1005:22: error: 'NRF_POWER_Type {aka struct <anonymous>}' has no member named 'DCDCEN0'; did you mean 'DCDCEN'?
         return (NRF_POWER->DCDCEN0 & POWER_DCDCEN0_DCDCEN_Msk)
                          ^~
    ../../nRF5_SDK_for_Thread_and_Zigbee_2.0.0_29775ac_min/modules/nrfx/hal/nrf_power.h:1005:34: error: 'POWER_DCDCEN0_DCDCEN_Msk' undeclared (first use in this function)
         return (NRF_POWER->DCDCEN0 & POWER_DCDCEN0_DCDCEN_Msk)
                                      ^~~~~~~~~~~~~~~~~~~~~~~~
    ../../nRF5_SDK_for_Thread_and_Zigbee_2.0.0_29775ac_min/modules/nrfx/hal/nrf_power.h:1007:13: error: 'POWER_DCDCEN0_DCDCEN_Enabled' undeclared (first use in this function)
                (POWER_DCDCEN0_DCDCEN_Enabled << POWER_DCDCEN0_DCDCEN_Pos);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../nRF5_SDK_for_Thread_and_Zigbee_2.0.0_29775ac_min/modules/nrfx/hal/nrf_power.h:1007:45: error: 'POWER_DCDCEN0_DCDCEN_Pos' undeclared (first use in this function)
                (POWER_DCDCEN0_DCDCEN_Enabled << POWER_DCDCEN0_DCDCEN_Pos);
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~
    ../../drivers/usb_print.c: In function 'usb_print_loop':
    ../../drivers/usb_print.c:229:12: error: implicit declaration of function 'app_usbd_event_queue_process' [-Werror=implicit-function-declaration]
         while (app_usbd_event_queue_process())
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1.exe: all warnings being treated as errors
    make: *** [../../nRF5_SDK_for_Thread_and_Zigbee_2.0.0_29775ac_min/components/toolchain/gcc/Makefile.common:272: _build/nrf52833_xxaa/usb_print.c.o] Error 1

    Hope it helps,

    Joel V.

  • Hi Joel,

    Actually, the problem is probably that 'POWER_CLOCK_IRQHandler' is *not* being redefined. Assuming you use the SDK drivers, you need the nrfx_irqs_nrf52833.h (this line) to connect POWER_CLOCK_IRQHandler to the nrfx_power_clock_irq_handler()  in nrfx_power_clock.c.

    Please make sure the your nrfx_irqs.h file includes the following line: https://github.com/NordicSemiconductor/nrfx/blob/1aa7824f45d46b5f81250801868bef050ba72440/soc/nrfx_irqs.h#L47 and that nrfx_irqs_nrf52833.h is in your include path.

    Best regards,

    Vidar

  • Hi Vidar,

    The nrfx_irqs_nrf52833.h path is included and the following line is written

    https://github.com/NordicSemiconductor/nrfx/blob/1aa7824f45d46b5f81250801868bef050ba72440/soc/nrfx_irqs.h#L47

    I have tried multiple configurations and there is still those 2 variables that are undefined in my system:

    NRFX_POWER_CONFIG_DEFAULT_DCDCEN and NRFX_POWER_CONFIG_DEFAULT_DCDCENHV

    Thanks,

    Joel V.

  • Hi Joel,

    I realize now that there must be more files needing to be patched to get 52833 support in SDK 15.0.0, so it might be easier to just update the entire nrfx directory.

    Have you tried to see if your project compiles against the latest nrfx 1.x release?  I don't believe there should be any breaking changes as long as you stay on the 1.x branch.

    Joel V said:
    NRFX_POWER_CONFIG_DEFAULT_DCDCEN and NRFX_POWER_CONFIG_DEFAULT_DCDCENHV

    I need to look more into this later.  Unlike the 52840, the 52833 does not have a high voltage DCDC regulator, so it kind of makes sense that the last symbol is undefined here.

    Best regards,

    Vidar

  • First, I realized that I was using almost exclusively the nRF5_SDK_for_Thread_and_Zigbee_2.0.0_29775ac_min

    I tried using nRF5_SDK_16.0.0 instead and it solved some problems (i think), then I had the errors I told you about.  Then I found the nrfx_power.c in the 16.0.0 and i didnt have the error anymore, but I cannot find the nrfx_power_clock.c so I commented it and debbugged my nrf52833 and it goes in an infinite loop in nrfx_spim.c while trying to send or receive data to my antenna, is there something to change in terms of pinout for the antenna in the software ?

    I think it my solve the problem.

    Thanks,

    Joel V.

Related