5 posts / 0 new
Last post
fb
Offline
Last seen: 6 years 6 days ago
Joined: 2016-03-14 17:50
Smart Dice while loop problem

Hi,

I have a Smart Dice hardware & have downloaded the software from this support site.
When using keil, im launching the dice soft compilation (and i have a warning for being in Developper Mode) and its ok.
Then i start a debug session and launch the program.

It goes running but is blocked in a dead end loop and i cannot detect any BLE !
When i stop, i see the loop is in arch_main on line 548 :
while ((GetWord16(SYS_STAT_REG) & DBG_IS_UP) == DBG_IS_UP) {};

So i guess its because im in debug mode.
So i tried not in debug mode (by changing line 52 in DA14580_config.h) :
#define DEVELOPMENT_DEBUG 0

i compiled and started a debug session in kheil.
i launched the program.
It starts the BLE of my dice but the program ends directly.
I suppose it should go in a loop but its not the case.

So i imagines it was because im in kheil.
I wanted to try to flash the dice with Smart Snippets but im new at that and dont know how to do it.

Can you please help me make this Smart Dice work please ?

Thx
Best Regards,
François

Device: 
Gongyu_Dialog
Offline
Last seen: 6 days 17 hours ago
Joined: 2016-04-27 07:07
//while ((GetWord16(SYS_STAT

//while ((GetWord16(SYS_STAT_REG) & DBG_IS_UP) == DBG_IS_UP) {};

if you want to debug under keil environment,you may change to active mode.
const static sleep_state_t app_default_sleep_mode=ARCH_SLEEP_OFF;

else, you can close the keil debug interface, it also works

fb
Offline
Last seen: 6 years 6 days ago
Joined: 2016-03-14 17:50
Hi,

Hi,

Thanks for your quick answer!

Actually i would like to flash my dices if it works correctly.
If not, i want to debug and try to understand where the problem is.
But if its works fine, no need.

So i want to test the software in normal conditions.
But not in OTP, just to make sure every things ok.
And then flash on OTP.

How can i do that ?
I saw your arch sleep parameter.
Should i put it in ARCH_EXT_SLEEP_ON or ARCH_DEEP_SLEEP_ON ? In order to test the normal conditions ?

2nd question : how do i lauch the soft in keil without being in the debug interface ? (the load button outside the debug interface, send me a "failed to execute ' ' ".

Thanks again
François

Gongyu_Dialog
Offline
Last seen: 6 days 17 hours ago
Joined: 2016-04-27 07:07
1. we generally use ARCH_EXT

1. we generally use ARCH_EXT_SLEEP_ON, that's extended sleep mode.
2. You can run in debug mode, then close the window. Or in smartsnippets, in boot mode, download the bin file

fb
Offline
Last seen: 6 years 6 days ago
Joined: 2016-03-14 17:50
Hi again,

Hi again,

1- i set :
arch_sleep.c ==> sleep_env.slp_state = ARCH_EXT_SLEEP_ON
(there is no const static sleep_state_t app_default_sleep_mode in the code i downloaded from your Website)

da14580_config.h ==> #define DEVELOPMENT_DEBUG 0

When launching, the program is still blocked in the while loop.
I dont understand.

2- from keil : i launch it in debug mode. Then i close the window ==> The software stops.
from Smar snippets : i browse the file generated from keil :full_emb_sysram.hex
then i download it.
i am asked to press the reset button ==> So i do so but nothing happens.
I dont know if i mentionned it but i use an external DA14580 as shown on the image joined.

Thanks for your answers.
François