I have developed an application for the nRF52-DK (nRf52832AA) and am now in the process of porting the application to my custom hardware. My custom hardware utilizes the nRF52832AB part, so I have updated the configuration and memory sizes accordingly. The resized application runs properly on the DK. When I run the exact same binary on my custom board, I get a hard fault exception in the MPSL_IRQ_TIMER0_Handler(). Since the code works perfectly on the DK, I cannot imagine what I need to change to get past this error. If I do not configure and use Bluetooth, my application appears to run.
nRF Connect SDK 1.5.1
Segger emStudio 5.34a
(EDIT: I noticed I used the nRF51422 as an example, but this should be same for nRF52832.)
1. Not sure how you have setup your board to use the nRF51822qfab, but I would have simply copied the nrf51dk_nrf51422 board directory to nrf51dk_nrf51422qfab directory.
2. Renamed the 3 files in the nrf51dk_nrf51422qfab directory to nrf51dk_nrf51422qfab, something like:
3. Then finally edit the .dts file to use:
I basically did the same thing. The strange thing is that the same binary works on the DK, but throws exceptions on the custom hardware.
Can you try this approach? Also build with --pristine.
I will build with --prestine.
What do you mean by "this approach"?
Opened one of the standard projects, changed uP to the AB variant, disabled "Settings". Here is the debug output:
[00:00:07.730,560] [0m<inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)[0m[00:00:07.730,560] [0m<inf> bt_hci_core: HW Variant: nRF52x (0x0002)[0m[00:00:07.730,590] [0m<inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 217.17378 Build 3224189809[0m[00:00:07.731,597] [0m<inf> bt_hci_core: Identity: DC:8F:81:FA:69:B1 (random)[0m[00:00:07.731,628] [0m<inf> bt_hci_core: HCI: version 5.2 (0x0b) revision 0x11c2, manufacturer 0x0059[0m[00:00:07.731,628] [0m<inf> bt_hci_core: LMP: version 5.2 (0x0b) subver 0x11c2[0m[00:00:07.740,478] [1;31m<err> mpsl_init: MPSL ASSERT: 112, 2163[0m[00:01:04.649,291] [1;31m<err> os: ***** HARD FAULT *****[0m[00:01:04.649,322] [1;31m<err> os: Fault escalation (see below)[0m[00:01:04.649,322] [1;31m<err> os: r0/a1: 0x00000003 r1/a2: 0x20006850 r2/a3: 0x20001860[0m[00:01:04.649,322] [1;31m<err> os: r3/a4: 0x00000007 r12/ip: 0x20000f04 r14/lr: 0x00010907[0m[00:01:04.649,322] [1;31m<err> os: xpsr: 0x41000018[0m[00:01:04.649,322] [1;31m<err> os: Faulting instruction address (r15/pc): 0x0001b562[0m[00:01:04.649,353] [1;31m<err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0[0m[00:01:04.649,353] [1;31m<err> os: Fault during interrupt handling[0m[00:01:04.649,353] [1;31m<err> os: Current thread: 0x20001860 (unknown)[0m[00:01:05.233,612] [1;31m<err> fatal_error: Resetting system[0m