0

SOFTDEVICE_HANDLER_INIT in nRF52832

Aaron Wiliam gravatar image

asked 2018-01-12 18:23:08 +0100

Hello. Everyone. I'm Aaron and beginner in nRF52832. I have some serious problems with using the nRF52832. I'm trying "ble_peripheral\experimental_ble_app_blinky" in Keil Version5.and there is no External 32.729KHz crystal on my Board. Project is "ble_peripheral\experimental_ble_app_blinky\pca10036\s132" in examples

After upload flash firmware to nRF52832, chip stopped. I tried Debug, and then I think Reason is SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, false); what's the solution? image description This is line(function) that stopped in debug. image description setting fro softDevice

What's ROM and RAM setting for BLE? link text

Please help!.

Thank you fro reading.

edit retag flag offensive close delete report spam

Comments

Are you using the PCA10040 DK? Have you tried ble_peripheral/ble_app_beacon or ble_peripheral/ble_app_uart instead? They both should work right out of the box. And check if the Keil debugger has the monitor mode debug enabled as you cannot do the single step debug without the monitor mode debugging turned on (search monitor mode debug in this forum or read the chapter on monitor mode debug in the JLink/JTrace User Guide).

Matt ( 2018-01-12 19:58:01 +0100 )editconvert to answer

Thank you for reply. I have tried PCA10040 DK and 10036.but both don't work. and I have tried ble_peripheral/ble_app_beacon and ble_peripheral\experimental_ble_app_blinky. also, don't work and stopped. What' the reason? CLOCK_SOURCE or setting 1ROM, 1RAM? .................... I will study Debug in Keil following your comment. Thank you.

Aron ( 2018-01-12 20:29:00 +0100 )editconvert to answer

If you're not using an external low frequency crystal then make sure you edit the "config/sdk_config.h" file and find and change "#define CLOCK_CONFIG_LF_SRC 0", "#define NRF_SDH_CLOCK_LF_SRC 0", "#define NRF_SDH_CLOCK_LF_RC_CTIV 16", and "#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2"

Then try to build and run. These changes were needed to get my board without an external crystal working and it did after the modifications.

nemik ( 2018-01-12 20:43:01 +0100 )editconvert to answer

2 answers

Sort by » oldest newest most voted
0
Aaron Wiliam gravatar image

answered 2018-01-12 21:10:57 +0100

updated 2018-01-12 21:13:05 +0100

Thank you, Nemik I'm using pca10040_s132 I have changed CLOCK_CONFIG_LF_SRC 0 in sdk_config.h, but NRF_SDH_CLOCK_LF_SRC, NRF_SDH_CLOCK_LF_RC_TEMP_CTIV and NRF_SDH_CLOCK_LF_RC_CTIV can't find in project files.

So, i changed NRF_CLOCK_LFCLKSRC in pca10040.h

#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_RC, \ .rc_ctiv = 16, \ .rc_temp_ctiv = 2, \ .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM} image description

But don't work. chip stopped.

main() in project

image description

I send to you my project file(example).

If you have time, please check this. if so, I'm very thank you. Good luck.

edit flag offensive delete publish link more

Comments

Which SDK version are you using?

nemik ( 2018-01-12 21:14:03 +0100 )editconvert to answer

this is nRF5_SDK_12.3.0_d7731ad installed to the keil.

Aron ( 2018-01-12 21:20:01 +0100 )editconvert to answer

I know for sure the example from ~\nRF5_SDK_12.2.0_f012efa\examples\ble_peripheral\ble_app_beacon\pca10040\s132\armgcc (using make and armgcc) will compile and run on the PCA10040 without changing anything in the example code. Can you double check your Keil project settings to see if you miss something there?

Matt ( 2018-01-13 00:37:14 +0100 )editconvert to answer

OK, than you. I have successfully compiled and downloaded in Keil. there is no error, no change something. It's strange. How do I do? Is there a problem with the softdevice configuration? Thank you.

Aron ( 2018-01-13 03:01:57 +0100 )editconvert to answer

Thank you for your help. Your comment is very useful to me. Project working well. You are a Great friend and Talent engineer. Thank you again. I hope to contact you in the future. My skype is naturalpow(aaron chih) Regard.

Aron ( 2018-01-15 12:05:12 +0100 )editconvert to answer
1
run_ar gravatar image

answered 2018-01-15 09:22:19 +0100

Aaron Wiliam gravatar image

updated 2018-01-15 12:36:57 +0100

Changing the LF clock setting should be enough. But if you are just starting development on nRF52832 you should use SDK 14.2 not 12.3... In sdk 14.2 you change the LF clock source in the SDK config file. Which Softdevice version did you program the chip with?

edit flag offensive delete publish link more

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

Stats

Asked: 2018-01-12 18:23:08 +0100

Seen: 29 times

Last updated: jan. 12