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

koniho gravatar image

asked 2017-03-18 00:32:46 +0100

updated 2017-03-20 15:08:50 +0100

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

int main(void)

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

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 flag offensive close delete report spam


Have you tried the ble_ant_app_hrm example? Does it work?

Petter Myhre ( 2017-03-22 15:44:55 +0100 )editconvert to answer

1 answer

Sort by » oldest newest most voted
koniho gravatar image

answered 2017-03-27 16:42:30 +0100

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.

edit flag offensive delete publish link 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.

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

Thank you for the answer.

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

User menu

    or sign up

Recent questions

Question Tools

1 follower


Asked: 2017-03-18 00:32:46 +0100

Seen: 103 times

Last updated: mars 27 '17