hardware timer in nrf connect sdk - counter alarm sample

I wanted to make a timer interrupt I went through the devzone support and saw the following post

 hardware timer in nrf connect sdk 

I have 2 questions

Question one

I am following the Zephyr API. I am trying to implement the counter alarm code in ble UART example. While doing so I am getting the following error in the logs.

00> [00:00:02.004,608] <err> mpsl_init: MPSL ASSERT: 112, 2228
00> [00:00:02.004,638] <err> os: ***** HARD FAULT *****
00> [00:00:02.004,638] <err> os:   Fault escalation (see below)
00> [00:00:02.004,638] <err> os: ARCH_EXCEPT with reason 3
00> 
00> [00:00:02.004,669] <err> os: r0/a1:  0x00000003  r1/a2:  0x20001e20  r2/a3:  0x20001e20
00> [00:00:02.004,669] <err> os: r3/a4:  0x00000000 r12/ip:  0x00000000 r14/lr:  0x0002579d
00> [00:00:02.004,669] <err> os:  xpsr:  0x6100001b
00> [00:00:02.004,669] <err> os: Faulting instruction address (r15/pc): 0x0002017e
00> [00:00:02.004,669] <err> os: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
00> [00:00:02.004,699] <err> os: Fault during interrupt handling
00> 
00> [00:00:02.004,699] <err> os: Current thread: 0x20001e20 (idle 00)
00> [00:00:02.306,701] <err> fatal_error: Resetting system

I am working on a custom board. I have included the following in the prj.conf file

CONFIG_COUNTER=y
CONFIG_COUNTER_RTC0=y
Question Two
I tried putting  "CONFIG_COUNTER_NRF_TIMER=y" in prj.conf file but getting the following error so I removed it. I guess it is related to my custom board dts file but I am not sure how to resolve it. custom board dts file is just the copy of nrf52832DK dts file. 
Parents
  • Have you tried to run the same application on the nRF52 DK? if you do not get the same error on the DK then it must be something with your custom board. If you get the same error on the DK, then we need to focus on the changes you made in your application.

    It is saying that there is a hardfault in the idle thread, one of the common reasons that could happen is due to stack overflow. Have you checked if your application have set up enough stack sizes for the threads?

Reply
  • Have you tried to run the same application on the nRF52 DK? if you do not get the same error on the DK then it must be something with your custom board. If you get the same error on the DK, then we need to focus on the changes you made in your application.

    It is saying that there is a hardfault in the idle thread, one of the common reasons that could happen is due to stack overflow. Have you checked if your application have set up enough stack sizes for the threads?

Children
Related