# S332 V2.0.0 with SDK 12.2.0 - Hangs at 0x000025c0

I have a simple application which pretty much consists of the following main function:

int main(void)
{
SOFTDEVICE_HANDLER_INIT(&clock_lf_cfg, NULL);

ble_enable_params_t ble_enable_params;
err_code = softdevice_enable_get_default_config(1, 1, &ble_enable_params);
APP_ERROR_CHECK(err_code);
}


I am using the SDK provided linker script armgcc_s332_nrf52832_xxaa.ld

When I execute this application, the processor seems to hang. If I attached the debugger, I see that the processor is hung at 0x000025C0 - strange thing is if I single step via si in the debugger and then continue execution via c - the program continues as normal.

I believe 0x000025C0 is in the softdevice execution range. Can you provide any hints as to what might be happening?

sdk_config.h attached. sdk_config.h

Note that the same source (built and linked against the s132v3 softdevice works as expected)

edit retag close delete

Have you tried the ble_ant_app_hrm example? Does it work?

( 2017-03-22 15:44:55 +0200 )editconvert to answer

Sort by » oldest newest most voted

After a bit more experimentation I was able to determine that the cause of the hang is due to not having the RTC initialized before calling SOFTDEVICE_HANDLER_INIT() - I'm not exactly sure why this wasn't an issue with previous SDK or SD versions or why the S132 was not affected in the same way.

I had thought that the Soft Device performs initialization of the required RTC (RTC0) by itself.

In my 'fix', I simply have initialized RTC2 before calling SOFTDEVICE_HANDLER_INIT() which seemed to solve the issue.

I do not fully understand the interdependencies here.

more

Since it works to initialize the RTC after the softdevice initialization with S132 but not with S332, the problem is most likely related to the ANT part of the softdevice. We don't have the source code for the ANT part, so to find the reason for the problem/behavior you will have contact Dynastream.

( 2017-03-29 12:43:43 +0200 )editconvert to answer

( 2017-03-29 19:38:33 +0200 )editconvert to answer

[hide preview]

## Recent blog posts

• ### Introducing nRF5 SDK for Mesh

Posted 2017-07-20 09:42:44 by Pär H

Posted 2017-07-19 06:53:42 by Mohammad Afaneh
• ### Unique Thread/Bluetooth multiprotocol solution with nRF5 SDK for Thread and nRF52840 SoC by Nordic

Posted 2017-07-14 10:31:56 by Krzysztof Loska
• ### nRF Connect macros (currently Android only)

Posted 2017-07-14 13:29:14 by Aleksander Nowakowski
• ### Power Optimization — From 3 to 7 Months on a Single Charge

Posted 2017-07-10 14:34:39 by Yaniv Nis

## Recent questions

• ### Purchase CBD Oil From Hemp For Health Impovement

Posted 2017-07-23 19:59:11 by Jina Calhoun
• ### I am in the nrf52-DK board, download S332 SoftDevice v2.0.0 and SDK12.3 in the experimental_ant_bootloader routine, can not enter the DFU mode. How can I operate to enter the Bluetooth DFU state？

Posted 2017-07-23 18:12:06 by bugg
• ### Does "nRF5 SDK for Mesh Alpha 0.9.1" support nRF52840-PDK?

Posted 2017-07-23 16:58:14 by Tao