This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How can I debug a system which is using softdevice S130 in BLE uart application?

I want to be able to read my i2c and program logic flow within the BLE application but when I try to set breakpoints it causes the cpu to do a hard reset. How can I capture the assert condition? I also need to be able to verify that my code executes properly the only way to do that is to create a whole nother project which is non BLE(softdevice) which is annoying. I also am using a timer which to generate a 1 second inteerupt and I am not exactly sure I am doing that correctly, when I looked I saw a post that talks about the HID keyboard example but it uses a scheduler and a different APP_TIMER_CREATESH() function from the BLE example uart application.

Thanks!!!

  • You can enable UART logging (printout) and after some fiddling with baudrate and load of information you need for effective debugging you might arrive to system which tells you enough to be able to find the bugs or even optimize the code without classical break-point and step in/over debugger. In the worst case you can only use one or few GPIO pins and signal certain states by LOW/HIGH (and watch it by logical analyzer or oscilloscope). Welcome to embedded programing with time-sensitive radio stack;)

  • app_timer_start seems to be my issue I try to create a timer like so

    APP_TIMER_DEF(m_battery_timer_id); err_code = app_timer_start(m_battery_timer_id, BATTERY_LEVEL_MEAS_INTERVAL, NULL);

    define BATTERY_LEVEL_MEAS_INTERVAL APP_TIMER_TICKS(1000, APP_TIMER_PRESCALER)

    howevere I realize it looks like another timer already used in HRS but I am using this copy and paste into BLE UART example code application

  • Nice! Just one question: have you read Tour guide (like one question per question and that you've searched the forum before asking)?:)

Related