Trying to run DSPS Version 3.150.2 on BASIC Board

19 posts / 0 new
Last post
thudwarp
Offline
Last seen:2 years 2 months ago
Joined:2015-01-28 00:53
Trying to run DSPS Version 3.150.2 on BASIC Board

Builds fine , but get the following on starting debugger.

Using uVusion 5.15, SDK 3.0.6, setting debugger to internal RAM as per the peripheral test,

Startup file seems the problem - if I comment it out the executable runs, but I can't see any BLE advertising. First question is wht is this startup file throwing errors?

Thanks - Chris

=============== || =================

JLink info:
------------
DLL: V4.96i, compiled Feb 19 2015 11:29:51
Firmware: J-Link OB-SAM3U128 V1 compiled Nov 28 2014 10:24:11
Hardware: V1.00
S/N : 480054962

* JLink Info: Found SWD-DP with ID 0x0BB11477
* JLink Info: Found Cortex-M0 r0p0, Little endian.
* JLink Info: FPUnit: 4 code (BP) slots and 0 literal slots
ROMTableAddr = 0xE00FF003

Target info:
------------
Device: ARMCM0
VTarget = 3.300V
State of Pins: TCK: 0, TDI: 0, TDO: 1, TMS: 1, TRES: 1, TRST: 1
Hardware-Breakpoints: 4
Software-Breakpoints: 8192
Watchpoints: 2
JTAG speed: 16667 kHz

Load "C:\\DialogSemiTools\\DA14580_DSPS_3.150.2\\dk_apps\\keil_projects\\sps\\sps_device\\out\\sps_device.axf"

* * *再保险stricted Version with 32768 Byte Code Size Limit
*** Currently used: 15516 Bytes (47%)

Include "C:\\DialogSemiTools\\DA14580_DSPS_3.150.2\\dk_apps\\keil_projects\\sps\\sps_device\\..\\..\\..\\misc\\sysram_case23.ini"
/* KILL BUTTON * */
/* DEFINE BUTTON "Reset DK580" , "include ../../../misc/sysram_case23.ini" */
RESET
E long 0x50000012 = 0xa4
E long 0x50003308 = 0x2e
LOAD %L

* * *再保险stricted Version with 32768 Byte Code Size Limit
*** Currently used: 15516 Bytes (47%)

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

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

exec("log > MyValues.log");
printf("*** dbg_remaining_times[]\n");
for (idx = 0; idx < 100; idx++) {
printf ("%d\n", dbg_remaining_times[idx]);
____________________^
*** error 34, line 51: undefined identifier
}
printf("*** dbg_sleep_times[]\n");
for (idx = 0; idx < 100; idx++) {
printf ("%d\n", dbg_sleep_times[idx]);
____________________^
*** error 34, line 55: undefined identifier
}
printf("*** dbg_check_times[]\n");
for (idx = 0; idx < 100; idx++) {
printf ("%d\n", dbg_check_times[idx]);
____________________^
* * *错误34,59行:未定义的标识符
}
printf("\n\n==== RESULTS ====\n");
min_delta = 0xffffffff;
printf("delta max\n");
for (idx = 0; idx < 100; idx++) {
int result;
if (dbg_remaining_times[idx] < 170)
________^
*** error 34, line 66: undefined identifier
result = 625 + dbg_remaining_times[idx] - 170;
_____________________^
*** error 34, line 67: undefined identifier
else
result = dbg_remaining_times[idx] - 170;
_______________^
*** error 34, line 69: undefined identifier
if (min_delta > result) min_delta = result;
printf ("%d\n", result);
}
printf("delta min\n");
for (idx = 0; idx < 100; idx++) {
int result;
if (dbg_remaining_times[idx] < 400)
________^
*** error 34, line 76: undefined identifier
result = 625 + dbg_remaining_times[idx] - 400;
_____________________^
*** error 34, line 77: undefined identifier
else
result = dbg_remaining_times[idx] - 400;
_______________^
*** error 34, line 79: undefined identifier
if (min_delta > result) min_delta = result;
printf ("%d\n", result);
}
printf("mininum logged delta: %d\n", min_delta);
printf("SLP remaining time\n");
for (idx = 0; idx < 100; idx++) {
printf ("%d\n", dbg_slp_rem[idx]);
____________________^
*** error 34, line 86: undefined identifier
}
printf("minimum logged SLP rem time: %d\n", dbg_slp_rem_min);
______________________________________________^
*** error 34, line 88: undefined identifier
printf("maximum logged SLP rem time: %d\n", dbg_slp_rem_max);
______________________________________________^
*** error 34, line 89: undefined identifier
printf("SLP hit to clk compensation progr delay: %d\n", dbg_slp_rem_diff_min);
__________________________________________________________^
*** error 34, line 90: undefined identifier
exec("log off");
} //displayvalues() ends
WS 1, `rxdesc

JE_Dialog
Offline
Last seen:15 hours 24 min ago
Staff
Joined:2013-12-05 14:02
Hello Chris, I'll discuss

你好,克里斯,我将讨论这与美国团队is week. Quick Q : what target HW are you using ? BASIC or PRO or Expert kit or PAN1740 / Murata module ?
Thanks & BR

JE_Dialog

thudwarp
Offline
Last seen:2 years 2 months ago
Joined:2015-01-28 00:53
I'm using BASIC board

I'm using BASIC board

Rgsd - Chris

TR_Dialog
Offline
Last seen:2 weeks 3 days ago
Staff
Joined:2014-06-30 23:52
Hi Chris:

Hi Chris:

I do also see the errors due to startup file. I will communicate this to our development team. I do see advertisements in spite of the errors. Can you try loading another sample project. My suggestion is that you load the proximitiy reporter project from SDK 3.0.6: C:\DA1458x_SDK_3.0.6\dk_apps\keil_projects\proximity\reporter_fh. Lets check out if you can see the advertisement with this project. We will go from there.

Thanks,

TR_DIALOG

thudwarp
Offline
Last seen:2 years 2 months ago
Joined:2015-01-28 00:53
That project doesn't throw

That project doesn't throw errors, but i still don't see advertising

Used connection manager to verify that chip is OK - peripheral mode advertises OK

thudwarp
Offline
Last seen:2 years 2 months ago
Joined:2015-01-28 00:53
Even more interesting - when

Even more interesting - when Idownload the DSPS project, It briefly advertises DialogDemo. The advertisement stops once I run the DSPS project

Rgds - Chris

TR_Dialog
Offline
Last seen:2 weeks 3 days ago
Staff
Joined:2014-06-30 23:52
Hi,

Hi,

Can you explain what do you mean by the following: "peripheral mode advertises OK"

proximity reporter_fh is also a peripheral project.

Thanks,

TR_DIALOG

thudwarp
Offline
Last seen:2 years 2 months ago
Joined:2015-01-28 00:53
I Mean that the peripheral

I Mean that the peripheral advertising works fine when I enable it using connection manager (boot as peripheral) - tested using LightBlue on iOS

thudwarp
Offline
Last seen:2 years 2 months ago
Joined:2015-01-28 00:53
Only change I make to the

Only change I make to the project are the settings in the Keil Target Options for internal memory - as per the peripheral test project.

Can you send me your version of the DSPS project that runs on the BASIC board in internal memory? If that doesn't work it must be a tool problem?

thudwarp
Offline
Last seen:2 years 2 months ago
Joined:2015-01-28 00:53
- When I stop the debugger

- When I stop the debugger the advertisement starts and I also see a few characters from the Android app make it to the USB serial port

- I'm also a little confused as to why I can't get a standard sample to work on a standard eval board out of the box. If that doesn't work it doesn't bode well for the future :)

thudwarp
Offline
Last seen:2 years 2 months ago
Joined:2015-01-28 00:53
Looks like we're held at

Looks like we're held at check_sys_startup_period() , line 849 - while ((GetWord16(SYS_STAT_REG) & DBG_IS_UP) == DBG_IS_UP) {};

Why is the DBG_IS_UP flag not being asserted? Can you confirm that his SW actually has been tested on a BASIC board? It seems to work fine on an EXPERT board.

TR_Dialog
Offline
Last seen:2 weeks 3 days ago
Staff
Joined:2014-06-30 23:52
Hi Chris:

Hi Chris:

Using the basic kit for DSPS requires some extra steps as outlined in section 8.1 of the user manual.

Have you tried that configuration ?

Thanks,

TR_DIALOG

thudwarp
Offline
Last seen:2 years 2 months ago
Joined:2015-01-28 00:53
Many Thanks for the reply.

Many Thanks for the reply.

Section 8.1 of the DSPS User Manual (UM-B-038)? That's how to get the serial port running. I'm not there yet - the advertisements aren't up & I can't connect.

Or is there some interplay I've missed? Eg the SW is bombing out because RTS is not set?

Also, why can I not use the serial port over the segger connection with no flow control? I can wire in another serial port, but ot seems an unnecessary hassle?

Regards - Chris

TR_Dialog
Offline
Last seen:2 weeks 3 days ago
Staff
Joined:2014-06-30 23:52
Hi Chris:

Hi Chris:

Here are a few points we discussed on our phone conversation:

- You will have to stop the debugger for the M0 processor to execute the code. This is necessary because Deep sleep or extended sleep conflicts with the J-Link debugger. You have to stop the debugger for the device to start advertising. You can also disable (undefine) both sleep modes in the da14580_config.h file of each project, this will allow you to also use the debugger.

- While using DSPS project with the basic kit, some extra steps are needed to get data moving in both directions . These steps are outlined in section 8.1 of the user manual.

- Expert kit might be better platform for your evaluation process. Expert kit also allows you to use power meter feature of Smart Snippets to monitor current consumption in real time. You can also connect external current meters to measure peak and sleep mode currents.

Thanks,

TR_DIALOG

thudwarp
Offline
Last seen:2 years 2 months ago
Joined:2015-01-28 00:53
Thanks . Yep, sleep mode is

Thanks . Yep, sleep mode is the culprit. Turn off deep sleep & the debugger is happy.

Also enable SW Flow control instead of HW flow control and the Segger UART works fine.

Closed.

xup14936
Offline
Last seen:2 years 7 months ago
Joined:2014-12-12 07:47
I am facing the same problem

I am facing the same problem as the original post using Expert Kit.
What should I do? There is no extra step for Expert kit in section 8.1 of the user manual.

behzad
Offline
Last seen:3 years 7 months ago
Joined:2015-01-27 17:53
I have a problem using Basic

I have a problem using Basic Dev kit and DSPS ref design. The sps_device project compiles and downloads to the board using JTAG but device does not show up in the DSPS android app. I used SW_FLOW_CTRL:
#define CFG_UART_SW_FLOW_CTRL
#undef CFG_UART_HW_FLOW_CTRL
Stopping the debug does not help either.
Downloading using SmartSnippets won't make any difference either.
Same problem happens with my custom board using DA14580_1.
Could you please help?

MT_dialog
Offline
Last seen:3 months 6 days ago
Staff
Joined:2015-06-08 11:34
Hi behzad,

Hi behzad,

Check your FTDI connections, if your connections are ok please remove the sleep configuration in order to debug your program and see where the program stucks.

Thanks MT_dialog.

behzad
Offline
Last seen:3 years 7 months ago
Joined:2015-01-27 17:53
Hi, thanks for your reply

Hi, thanks for your reply
Now, the basic dev board works with DSPS and advertises the device.
However, the same code on my custom board does not advertise and does not show up in the DSPS android app. I have used the ref design in buck mode for the 50ohm antenna and have used a 3.3nH inductor very close to the chip. When the DSPS is downloaded and and the debugger is stopped, I probe from RFIOp and nothing shows on scope (except a very low amplitude signal around 50mv) while in dev board I can observe a good signal. The custom board uses this small antenna:http://www.farnell.com/datasheets/1819371.pdfwith matching pi circuit (without the matching components yet).
How important the 50ohm impedance matching is?
Why do you think I don't see any signal when DSPS is running?
我需要改变什么在需求方对我的c代码吗ustom board (apart from GPIO allocations)?
I really appreciate your help.
Thank you