Unable to connect to DSPS device.

⚠️
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//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
12 posts / 0 new
Last post
Maurizio Malaspina
Offline
Last seen:9 months 18 hours ago
加入:2019-01-16 21:40
Unable to connect to DSPS device.

Hello,

I'm running the "DA1458x_DSPS\v_5.150.2\projects\target_apps\dsps\sps_device\Keil_5\sps_device.uvprojx" in RAM on a DA14580DEVKIT-PRO.
I'm not able to detect the device with your DSPS App 3.210.4 (25 July 2017) running on my Android device (Huawey P9 Lite).
What is the right procedure to work this demo?

Thank you very much in advance,
Maurizio

Keywords:
Device:
PM_Dialog
Offline
Last seen:2 days 13 hours ago
工作人员
加入:2018-02-08 11:03
Hi Maurizio Malaspina,

Hi Maurizio Malaspina,

The default dpsp_device application code uses hardware flow control. Please check the CFG_UART_HW_FLOW_CTRL in the user_periph_setup.h header file. So, in case you have the Pro-DK you should correctly configure the jumpers. I would suggest to have a look at Figure 19 of the UM-B-088 user manual. Do you have the same jumper configurations?

https://support.dialog-semiconductor.com/system/files/resources/UM-B-088%20DA14585%20Serial%20Port%20Service%20Reference%20Application_v1.0.pdf

Thanks, PM_Dialog

Maurizio Malaspina
Offline
Last seen:9 months 18 hours ago
加入:2019-01-16 21:40
Thank you for the reply.

Thank you for the reply.
The jumpers are correctly configured for UART with HW flow control communication.
I've rebuilt the target and now I can see the "DIALOG-SPS" device detected by the Bluetooth of my Android smartphone.
The problem now is that the debug stops.
I can see in the "Command" Window of the Keil IDE:

Running with Code Size Limit: 32K
Set JLink Project File to "C:\Users\Utente\Desktop\DA1458x_DSPS\v_5.150.2\projects\target_apps\dsps\sps_device\Keil_5\JLinkSettings.ini"* JLink Info: Device "CORTEX-M0" selected.

JLink info:
------------
DLL: V6.32i, compiled Jul 24 2018 15:19:55
Firmware: J-Link OB-SAM3U128 V1 compiled Jul 12 2018 12:17:48
Hardware: V1.00
S/N : 480068119

* JLink Info: Found SW-DP with ID 0x0BB11477
* JLink Info: Scanning AP map to find all available APs
* JLink Info: AP[1]: Stopped AP scan as end of AP map has been reached
* JLink Info: AP[0]: AHB-AP (IDR: 0x04770021)
* JLink Info: Iterating through AP map to find AHB-AP to use
* JLink Info: AP[0]: Core found
* JLink Info: AP[0]: AHB-AP ROM base: 0xE00FF000
* JLink Info: CPUID register: 0x410CC200. Implementer code: 0x41 (ARM)
* JLink信息:发现Cortex-M0 r0p0,小端字节序。
* JLink Info: FPUnit: 4 code (BP) slots and 0 literal slots
* JLink Info: CoreSight components:
* JLink Info: ROMTbl[0] @ E00FF000
* JLink Info: ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS
* JLink Info: ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
* JLink Info: ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
ROMTableAddr = 0xE00FF000
* JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
* JLink Info: Reset: Reset device via AIRCR.SYSRESETREQ.

Target info:
------------
Device: ARMCM0
VTarget = 3.300V
针的状态:TCK: 0, TDI: 1, TDO: 1、经颅磁刺激:1,混乱关系S: 1, TRST: 1
Hardware-Breakpoints: 4
Software-Breakpoints: 8192
Watchpoints: 2
JTAG speed: 1000 kHz

Include "C:\\Users\\Utente\\Desktop\\DA1458x_DSPS\\v_5.150.2\\projects\\target_apps\\dsps\\sps_device\\Keil_5\\..\\..\\..\\..\\..\\sdk_580\\sdk\\common_project_files\\misc\\sysram_case23.ini"
/* KILL BUTTON * */
/* DEFINE BUTTON "Reset DK580" , "include ../../../misc/sysram_case23.ini" */
RESET
* JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
* JLink Info: Reset: Reset device via AIRCR.SYSRESETREQ.
E long 0x50000012 = 0xa4
E long 0x50003308 = 0x2e
LOAD %L
* JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
* JLink Info: Reset: Reset device via AIRCR.SYSRESETREQ.
SP = _RDWORD (0x20000000)
$ = _RDWORD (0x20000004)

FUNC void disp_memlog(void)
{
int idx;
unsigned int min_delta;

exec("log > Memlog.log");

printf("\n\n*** Memory Logging Results ***\n\n");

printf(">>> ENV HEAP <<<\n");
printf("Used size in this HEAP : %4d (current) - %4d (maximum)\n", mem_log[0].used_sz, mem_log[0].max_used_sz);
printf("Used size in other HEAPs: %4d (current) - %4d (maximum)\n\n", mem_log[0].used_other_sz, mem_log[0].max_used_other_sz);

printf(">>> DB HEAP <<<\n");
printf("Used size in this HEAP : %4d (current) - %4d (maximum)\n", mem_log[1].used_sz, mem_log[1].max_used_sz);
printf("Used size in other HEAPs: %4d (current) - %4d (maximum)\n\n", mem_log[1].used_other_sz, mem_log[1].max_used_other_sz);

printf(">>> MSG HEAP <<<\n");
printf("Used size in this HEAP : %4d (current) - %4d (maximum)\n", mem_log[2].used_sz, mem_log[2].max_used_sz);
printf("Used size in other HEAPs: %4d (current) - %4d (maximum)\n\n", mem_log[2].used_other_sz, mem_log[2].max_used_other_sz);

printf(">>> Non-Ret HEAP <<<\n");
printf("Used size in this HEAP : %4d (current) - %4d (maximum)\n", mem_log[3].used_sz, mem_log[3].max_used_sz);
printf("Used size in other HEAPs: %4d (current) - %4d (maximum)\n\n", mem_log[3].used_other_sz, mem_log[3].max_used_other_sz);

exec("log off");
} //disp_memlog() ends

**JLink Warning: CPU could not be halted
***JLink Error: Can not read register 15 (R15) while CPU is running
***JLink Error: Can not read register 16 (XPSR) while CPU is running
***JLink Error: Can not read register 0 (R0) while CPU is running
***JLink Error: Can not read register 1 (R1) while CPU is running
***JLink Error: Can not read register 2 (R2) while CPU is running
***JLink Error: Can not read register 3 (R3) while CPU is running
***JLink Error: Can not read register 4 (R4) while CPU is running
***JLink Error: Can not read register 5 (R5) while CPU is running
***JLink Error: Can not read register 6 (R6) while CPU is running
***JLink Error: Can not read register 7 (R7) while CPU is running
***JLink Error: Can not read register 8 (R8) while CPU is running
***JLink Error: Can not read register 9 (R9) while CPU is running
***JLink Error: Can not read register 10 (R10) while CPU is running
***JLink Error: Can not read register 11 (R11) while CPU is running
***JLink Error: Can not read register 12 (R12) while CPU is running
***JLink Error: Can not read register 13 (R13) while CPU is running
***JLink Error: Can not read register 14 (R14) while CPU is running
***JLink Error: Can not read register 15 (R15) while CPU is running
***JLink Error: Can not read register 16 (XPSR) while CPU is running
***JLink Error: Can not read register 17 (MSP) while CPU is running
***JLink Error: Can not read register 18 (PSP) while CPU is running
***JLink Error: Can not read register 20 (CFBP) while CPU is running

What could be the issue?

Thank you in advance,
Maurizio

PM_Dialog
Offline
Last seen:2 days 13 hours ago
工作人员
加入:2018-02-08 11:03
Hi Maurizio Malaspina,

Hi Maurizio Malaspina,

Could you please run it with hot attach the debugger in order to find where the firmware gets crashed? When the code get crashed? When you are trying to connect from you phone? Since you downloaded the firmware to System-RAM, the DA14580 starts advertising? Could you please check it with the power profiler of SmartSnipptes toolbox?

Thanks, PM_Dialog

Maurizio Malaspina
Offline
Last seen:9 months 18 hours ago
加入:2019-01-16 21:40
Thank you for the reply.

Thank you for the reply.

I've correctly pointed the ".....\DA1458x_DSPS\v_5.150.2\projects\target_apps\dsps\sps_device\Keil_5\JLinkSettings.ini" initialization file in the debug tab of the "option for target 'spds_device_580'" inthe KEIL uVision IDE.

In this way no crash happens during debugging in RAM and launching the "DIALOG-SPS" App on my Android smartphone my "DIALOG-SPS" device is found.

Despite of this the connection cannot be established during debugging.

If I upload the application in RAM using the "booter" tool provided by "SmartSnippet Toolbox v.5.0.6.2196" the application run and the connection can be established!

Why the application doesn't properly run during debug?

PM_Dialog
Offline
Last seen:2 days 13 hours ago
工作人员
加入:2018-02-08 11:03
Hi Maurizio Malaspina,

Hi Maurizio Malaspina,

>> Despite of this the connection cannot be established during debugging.

Do you mean that you have the debugger hot attached and you are not able to connect?

>> If I upload the application in RAM using the "booter" tool provided by "SmartSnippet Toolbox v.5.0.6.2196" the application run and the connection can be established!

Could you please clarify it? Do you mean that you download the firmware into the SPI Flash?

Thanks, PM_Dialog

Maurizio Malaspina
Offline
Last seen:9 months 18 hours ago
加入:2019-01-16 21:40
Thank you for the reply and

Thank you for the reply and excuse me for the delay.

>>Do you mean that you have the debugger hot attached and you are not able to connect?

Exactly (see "Picture_1.png" attached)

I note a "*** error 10: Syntax error" in the command prompt, when I launch the debugging session.

>> Could you please clarify it? Do you mean that you download the firmware into the SPI Flash?

I'm loading the hex file into the main SysRAM of the chip (see "Picture_2.png" and "Picture_3.png" attached) and the DIALOG_SPD device is detected (see "Screenshot_Android.png").

This is the complete command prompt output:

Running with Code Size Limit: 32K
Set JLink Project File to "C:\Users\Utente\Desktop\DA1458x_DSPS\v_5.150.2\projects\target_apps\dsps\sps_device\Keil_5\JLinkSettings.ini"* JLink Info: Device "CORTEX-M0" selected.

JLink info:
------------
DLL: V6.32i, compiled Jul 24 2018 15:19:55
Firmware: J-Link OB-SAM3U128 V1 compiled Jul 12 2018 12:17:48
Hardware: V1.00
S/N : 480068119

* JLink Info: Found SW-DP with ID 0x0BB11477
* JLink Info: Scanning AP map to find all available APs
* JLink Info: AP[1]: Stopped AP scan as end of AP map has been reached
* JLink Info: AP[0]: AHB-AP (IDR: 0x04770021)
* JLink Info: Iterating through AP map to find AHB-AP to use
* JLink Info: AP[0]: Core found
* JLink Info: AP[0]: AHB-AP ROM base: 0xE00FF000
* JLink Info: CPUID register: 0x410CC200. Implementer code: 0x41 (ARM)
* JLink信息:发现Cortex-M0 r0p0,小端字节序。
* JLink Info: FPUnit: 4 code (BP) slots and 0 literal slots
* JLink Info: CoreSight components:
* JLink Info: ROMTbl[0] @ E00FF000
* JLink Info: ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS
* JLink Info: ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
* JLink Info: ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
ROMTableAddr = 0xE00FF000
* JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
* JLink Info: Reset: Reset device via AIRCR.SYSRESETREQ.

Target info:
------------
Device: ARMCM0
VTarget = 3.300V
针的状态:TCK: 0, TDI: 1, TDO: 1、经颅磁刺激:1,混乱关系S: 1, TRST: 1
Hardware-Breakpoints: 4
Software-Breakpoints: 8192
Watchpoints: 2
JTAG speed: 1000 kHz

Load "C:\\Users\\Utente\\Desktop\\DA1458x_DSPS\\v_5.150.2\\projects\\target_apps\\dsps\\sps_device\\Keil_5\\out_580\\sps_device_580.axf"
* JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
* JLink Info: Reset: Reset device via AIRCR.SYSRESETREQ.
Include "C:\\Users\\Utente\\Desktop\\DA1458x_DSPS\\v_5.150.2\\projects\\target_apps\\dsps\\sps_device\\Keil_5\\JLinkSettings.ini"
[BREAKPOINTS]
^
*** error 10: Syntax error

What do you think is wrong?

Thank you in advance,

Maurizio

PM_Dialog
Offline
Last seen:2 days 13 hours ago
工作人员
加入:2018-02-08 11:03
Hi Maurizio Malaspina

Hi Maurizio Malaspina

Could you please read theTutorial 8: Debugging methodstutorial from our support website in order to see how you can run the code in debug mode?

Thanks, PM_Dialog

Maurizio Malaspina
Offline
Last seen:9 months 18 hours ago
加入:2019-01-16 21:40
Dear PM_Dialog,

Dear PM_Dialog,

thanks for the support.

I've successfully read and putted into practice the first part of tutorial 8.

Subsequently I've tried to perform the same steps in the sps_device project.

The first attempt failed. I've discovered that the default initialization file for the JLINK pointed in the "Option for target 'sps_device_580' --> Debug" tab was wrong.

The right one to point is "..\..\..\..\..\sdk_580\sdk\common_project_files\misc\sysram_case23.ini".

In this way, no more "*** error 10: Syntax error" raises in the command prompt output window.

In this project, unfortunately, the UART2 port is used as I/O terminal for the UART over BLE, so I cannot activate the "CFG_PRINTF" as described in the tutorial 8, but the debug starts in the KEIL IDE.

With this configuration, the DIALOG-SPS application is able to detect the device and all is properly working but the JLINK loses the connection preventing to perform real-time debugging from the IDE.

When the connection to the uC is lost, the command prompt output windows shows:

Running with Code Size Limit: 32K
Set JLink Project File to "C:\Users\Utente\Desktop\DA1458x_DSPS\v_5.150.2\projects\target_apps\dsps\sps_device\Keil_5\JLinkSettings.ini"* JLink Info: Device "CORTEX-M0" selected.

JLink info:
------------
DLL: V6.32i, compiled Jul 24 2018 15:19:55
Firmware: J-Link OB-SAM3U128 V1 compiled Jul 12 2018 12:17:48
Hardware: V1.00
S/N : 480068119

* JLink Info: Found SW-DP with ID 0x0BB11477
* JLink Info: Scanning AP map to find all available APs
* JLink Info: AP[1]: Stopped AP scan as end of AP map has been reached
* JLink Info: AP[0]: AHB-AP (IDR: 0x04770021)
* JLink Info: Iterating through AP map to find AHB-AP to use
* JLink Info: AP[0]: Core found
* JLink Info: AP[0]: AHB-AP ROM base: 0xE00FF000
* JLink Info: CPUID register: 0x410CC200. Implementer code: 0x41 (ARM)
* JLink信息:发现Cortex-M0 r0p0,小端字节序。
* JLink Info: FPUnit: 4 code (BP) slots and 0 literal slots
* JLink Info: CoreSight components:
* JLink Info: ROMTbl[0] @ E00FF000
* JLink Info: ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS
* JLink Info: ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
* JLink Info: ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
ROMTableAddr = 0xE00FF000
* JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
* JLink Info: Reset: Reset device via AIRCR.SYSRESETREQ.

Target info:
------------
Device: ARMCM0
VTarget = 3.300V
针的状态:TCK: 0, TDI: 1, TDO: 1、经颅磁刺激:1,混乱关系S: 1, TRST: 1
Hardware-Breakpoints: 4
Software-Breakpoints: 8192
Watchpoints: 2
JTAG speed: 1000 kHz

Load "C:\\Users\\Utente\\Desktop\\DA1458x_DSPS\\v_5.150.2\\projects\\target_apps\\dsps\\sps_device\\Keil_5\\out_580\\sps_device_580.axf"
* JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
* JLink Info: Reset: Reset device via AIRCR.SYSRESETREQ.
Include "C:\\Users\\Utente\\Desktop\\DA1458x_DSPS\\v_5.150.2\\projects\\target_apps\\dsps\\sps_device\\Keil_5\\..\\..\\..\\..\\..\\sdk_580\\sdk\\common_project_files\\misc\\sysram_case23.ini"
/* KILL BUTTON * */
/* DEFINE BUTTON "Reset DK580" , "include ../../../misc/sysram_case23.ini" */
RESET
* JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
* JLink Info: Reset: Reset device via AIRCR.SYSRESETREQ.
E long 0x50000012 = 0xa4
E long 0x50003308 = 0x2e
LOAD %L
* JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
* JLink Info: Reset: Reset device via AIRCR.SYSRESETREQ.
SP = _RDWORD (0x20000000)
$ = _RDWORD (0x20000004)

FUNC void disp_memlog(void)
{
int idx;
unsigned int min_delta;

exec("log > Memlog.log");

printf("\n\n*** Memory Logging Results ***\n\n");

printf(">>> ENV HEAP <<<\n");
printf("Used size in this HEAP : %4d (current) - %4d (maximum)\n", mem_log[0].used_sz, mem_log[0].max_used_sz);
printf("Used size in other HEAPs: %4d (current) - %4d (maximum)\n\n", mem_log[0].used_other_sz, mem_log[0].max_used_other_sz);

printf(">>> DB HEAP <<<\n");
printf("Used size in this HEAP : %4d (current) - %4d (maximum)\n", mem_log[1].used_sz, mem_log[1].max_used_sz);
printf("Used size in other HEAPs: %4d (current) - %4d (maximum)\n\n", mem_log[1].used_other_sz, mem_log[1].max_used_other_sz);

printf(">>> MSG HEAP <<<\n");
printf("Used size in this HEAP : %4d (current) - %4d (maximum)\n", mem_log[2].used_sz, mem_log[2].max_used_sz);
printf("Used size in other HEAPs: %4d (current) - %4d (maximum)\n\n", mem_log[2].used_other_sz, mem_log[2].max_used_other_sz);

printf(">>> Non-Ret HEAP <<<\n");
printf("Used size in this HEAP : %4d (current) - %4d (maximum)\n", mem_log[3].used_sz, mem_log[3].max_used_sz);
printf("Used size in other HEAPs: %4d (current) - %4d (maximum)\n\n", mem_log[3].used_other_sz, mem_log[3].max_used_other_sz);

exec("log off");
} //disp_memlog() ends

**JLink Warning: CPU could not be halted
***JLink Error: Can not read register 15 (R15) while CPU is running
***JLink Error: Can not read register 16 (XPSR) while CPU is running
***JLink Error: Can not read register 0 (R0) while CPU is running
***JLink Error: Can not read register 1 (R1) while CPU is running
***JLink Error: Can not read register 2 (R2) while CPU is running
***JLink Error: Can not read register 3 (R3) while CPU is running
***JLink Error: Can not read register 4 (R4) while CPU is running
***JLink Error: Can not read register 5 (R5) while CPU is running
***JLink Error: Can not read register 6 (R6) while CPU is running
***JLink Error: Can not read register 7 (R7) while CPU is running
***JLink Error: Can not read register 8 (R8) while CPU is running
***JLink Error: Can not read register 9 (R9) while CPU is running
***JLink Error: Can not read register 10 (R10) while CPU is running
***JLink Error: Can not read register 11 (R11) while CPU is running
***JLink Error: Can not read register 12 (R12) while CPU is running
***JLink Error: Can not read register 13 (R13) while CPU is running
***JLink Error: Can not read register 14 (R14) while CPU is running
***JLink Error: Can not read register 15 (R15) while CPU is running
***JLink Error: Can not read register 16 (XPSR) while CPU is running
***JLink Error: Can not read register 17 (MSP) while CPU is running
***JLink Error: Can not read register 18 (PSP) while CPU is running
***JLink Error: Can not read register 20 (CFBP) while CPU is running

Perhaps any sleep mode enters making thus the JLINK connection falling down?

Is possible to perform a standard debug of this project?

Am I forced to use serial ports to debg?

What are the limitations/constraints in general?

Thank you very much indeed in advance,

Maurizio

PM_Dialog
Offline
Last seen:2 days 13 hours ago
工作人员
加入:2018-02-08 11:03
Hi Maurizio Malaspina,

Hi Maurizio Malaspina,

The DSPS projects is by default using the extended sleep mode, so if you change it into the active mode, could you please let me now if you have the same issue?

app_default_sleep_mode = ARCH_SLEEP_OFF ; // in user_config.h

Thanks, PM_Dialog

Maurizio Malaspina
Offline
Last seen:9 months 18 hours ago
加入:2019-01-16 21:40
Yes, thanks al lot!

Yes, thanks al lot!

In this way the debugger seems to properly work.

Could you pse send me some links to the debugging limitations / what to know in order to understand what are the debugging limitations and/or how sleep modes influence the behaviour of the code?

Regards,

Maurizio

PM_Dialog
Offline
Last seen:2 days 13 hours ago
工作人员
加入:2018-02-08 11:03
Hi Maurizio Malaspina,

Hi Maurizio Malaspina,

You can refer to ARM for debugging limitation. We haven’t any document describing this kind of limitations. A debugging limitation is up 4 breakpoint and up to 8 watch points. When you run the project in extended sleep mode the debugger is powered off, so that’s the reason why you were not able to attach it. If you found any answer useful, pleas mark it as “accepted”.

Thanks, PM_Dialog