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
  • Hello,

    Are you able to debug the application to see if the program hangs or crashes? It should generally be fairly straight forward port FW from the 52840 to 52833. The most important step is probably to remember to include the correct startup files and update the linker settings to reflect the new memory address ranges.

    The relevant startup files are:

    $(SDK_ROOT)/modules/nrfx/mdk/gcc_startup_nrf52833.S

    $(SDK_ROOT)/modules/nrfx/mdk/system_nrf52833.c

    Also remember to replace the preprocessor flag "NRF52840_XXAA" with NRF52833_XXAA in your makefile.

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

    Did you update the MDK files in  /nRF5_SDK_15.0.0_a53641a/modules/nrfx/mdk/ with files with one of the more recent MDK releases here: https://www.nordicsemi.com/Products/Development-tools/nRF-MDK?

    Best regards,

    Vidar

  • Hi Vidar,

    I couldn't reply to your last message so I replied here, I read the regs and got this:

    Seems like the faulty IRQ is the 0 which is POWER_CLOCK. Any hint on what could cause that ?

    Thanks,

    Joel V.

  • Hi Joel,

    Do you have a power/clock interrupt handler in your application defined under a different name? I.e. something else than 'POWER_CLOCK_IRQHandler'

    In our examples, it is redefined to nrfx_power_clock_irq_handler:

    I guess you must have some redefine too that is not included now when you build with -DNRF52833_XXAA.

  • 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

Reply Children
Related