This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SoftDevice with Timer peripherals goes to app_error_weak.c

I am trying to measure frequency of a gpio pin.

I am using the code from the below thread -

https://devzone.nordicsemi.com/f/nordic-q-a/9036/measuring-input-gpio-pin-frequency-with-soft-device-running

I did modify it to be suitable with the new SDK V17.

//The  mode 1 was depcrecated so I am using the below modes.
NRF_TIMER1->MODE = 0; // Timer mode

NRF_TIMER2->MODE = 2; // Low power counter mode


I have added the custom ble service / characteristic tutorial code along with this.

When I run the code on debug mode, it goes to app_error_weak.c

I am not sure why this is happening. I tried to create break points but I am unsure from where this is being triggered.

However, the BLE service runs fine. It does not stop or create issues.

I am a bit new to SoftDevice. May I know where am I going wrong?

Parents
  • Hi

    There is an issue in the SDK that causes this define to add \r\r\n instead of \r\n I believe, so SES will add \r before \n without checking if it's already present.

    As for the error log, can you add DEBUG to your preprocessor defines to see if we can get any more information. Also, note that this specific error states "return value can be safely ignored", so what happens if you remove this breakpoint and lets the application run? Where exactly are you entering this critical region?

    Best regards,

    Simon

Reply
  • Hi

    There is an issue in the SDK that causes this define to add \r\r\n instead of \r\n I believe, so SES will add \r before \n without checking if it's already present.

    As for the error log, can you add DEBUG to your preprocessor defines to see if we can get any more information. Also, note that this specific error states "return value can be safely ignored", so what happens if you remove this breakpoint and lets the application run? Where exactly are you entering this critical region?

    Best regards,

    Simon

Children
No Data
Related