ble_peripheral crash constantly

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
7 posts / 0 new
Last post
Thomas Donhauser
Offline
Last seen: 5 months 3 weeks ago
Joined: 2019-10-20 10:45
ble_peripheral crash constantly

Hello!

The sample project ble_peripheral crashes constantly after a few seconds and I have no idea why. I'm testing with the da14683-USB-Kit to evaluate the SOC. It stops in main() as expected. After pressing F8 to continue it stops with

Program received signal SIGTRAP, Trace/breakpoint trap.

0x00000000 in ?? ()

In the source window it shows a new tab named 0x0 with the comment: No source available for "0x0" . If I press the button „View Disassembly“ it shows nothing. 

I upload the bin-file with programm_qspi_jtag.win, I reset the board, I start the debugger, it stops at main(), I press F8 to continue and after a few seconds: CRASH!
The freertos_retarget example runs invinitly with the debugger as expected. I have 2 boards and the crash happes on both of it. I'de like to choose this sample project as a starting point, but so far, no luck...

Thanks for help,

Thomas

Device: 
Thomas Donhauser
Offline
Last seen: 5 months 3 weeks ago
Joined: 2019-10-20 10:45
Additional information: the

Additional information: The exsample project ble_adv also crashes after a few seconds.

I'm using: SmartSnippets™ Studio Version: 2.0.10.1468 + JLink_V612i + Ozone V2.70b + SystemView_V252d, running on Windows 10 PRO.

My last guess is that the project setup is not properly configured for the DA 14683 USB-Kit. But I have no clue if this is right or wrong, nor how to do it better. I also have deleted and reinstalled everything again from scratch, but I'm still ending up in crashes when it comes to one of the mentioned ble-examples ... 

Thomas Donhauser
Offline
Last seen: 5 months 3 weeks ago
Joined: 2019-10-20 10:45
Additional information: I'm

Additional information: I'm using the iOS Tool „LightBlue“ to scan and parse BLE-Device. Whenever I press the reset-Button on the DA14683 USB-Kit board, I can connect LightBlue to the device. But after a few seconds the board disconnects. I assume that the disconnect is invoked by a crash on the board. So it is not necessary to launch a debug-session.  

Thomas Donhauser
Offline
Last seen: 5 months 3 weeks ago
Joined: 2019-10-20 10:45
Problem solved!

Problem solved!

After changing in main.c , function system_init(...) the statment

pm_set_sleep_mode(pm_mode_extended_sleep);

to 

pm_set_sleep_mode(pm_mode_active/);

suddenly it works as expected. Now I will try to understand what exactly the difference is, resp. what  pm_mode_extended_sleep is good for and how to use it without running into crashes. If anybody has a feasible explanation, I'd very much appreciate it.

Thank you,

Thomas

PM_Dialog
Offline
Last seen: 7 months 1 week ago
Staff
Joined: 2018-02-08 11:03
Hi Thomas,

Hi Thomas,

I would advise you to  read UM-B-094 User Manual: DA14682/DA14683 USB Kit  document from our support website. In section 5.16  Power Section you will find that there is a switch button (SW6). According to the documents, the DA14683 SoC can be supplied either from the USB port with a voltage of 5V to the VBUS pin or through LDO (U10) with a voltage of 3.3V to the VBAT pin. The power selection is achieved through the switch SW6 (Figure 30, Figure 31). The maximum current for SW6 is 100mA. The default position of SW6 connects the VBUS pin of DA14683 with the USB port (5V). Please find more information in section 6. Both ble_peripheral and  ble_adv examples use extended sleep mode, so if the SW is in VBUS position, the chip will not be able to enter the sleep and is will continuedly resets. If you would like to have extended sleep mode, you should place the SW in VBAT position.

Thanks, PM_Dialog

Thomas Donhauser
Offline
Last seen: 5 months 3 weeks ago
Joined: 2019-10-20 10:45
Hi!

Hi!
After reading your comment and reading the chapters you mentioned in  UM-B-094 it sounds logic. I read it already before, but obviously not precisely enough and so i overlooked the issue about the sleep mode, not being aware what this could cause ..
Thank you!
Thomas

PM_Dialog
Offline
Last seen: 7 months 1 week ago
Staff
Joined: 2018-02-08 11:03
Hi Thomas,

Hi Thomas,

Glad that you figured your issue out.

Thanks, PM_Dialog