Page 1 of 1

Switching to EM2 mode

Posted: Fri Apr 15, 2016 9:06 am
by leosw
Hi,

I was not able to find documentation about libraries you have coded.

I'm trying to make the comonent in EM2 mode during 15min and then wake it up using the RTC.
Do I need to implement this behavior or is that included in the RTC library ?

Léo

Edit: Also it looks like the User_loop is not called as a loop but I need to have a while(1) instruction inside it to have expected behavior.

Re: Switching to EM2 mode

Posted: Fri Apr 15, 2016 9:18 am
by lcheminade
This is already the behaviour of the SDK. The UserLoop is in the main while(1) and the proc goes to EM2 when out of UserLoop. On interrupt UserLoop is called again. You can use the scheduler to wake up the chip at a given interval.

Re: Switching to EM2 mode

Posted: Fri Apr 15, 2016 9:31 am
by leosw
Ok, I just don't understand how often is the User_LOOP called and how to setup it.

For example I want to get a sensor value (the td_sensor lib name is disturbing), every minutes. the best way is to use timers and interrupts or to but the code in the user loop ?
If so how to setup user loop to be called every minutes. It looks like the user loop is on all examples but no one is using it as a loop.

Sorry again for all this question but it's a little bit hard to find answers.

Léo

Re: Switching to EM2 mode

Posted: Fri Apr 15, 2016 10:37 am
by leosw
In fact it looks like I have some problem with the latest version. The TD_USER_Loop is called only once. As in the cold_hot sensor example.

Re: Switching to EM2 mode

Posted: Wed Apr 27, 2016 12:24 pm
by omlu
leosw wrote:In fact it looks like I have some problem with the latest version. The TD_USER_Loop is called only once. As in the cold_hot sensor example.


Hi all,

I have the same problem (with a TD1208). Did you find a solution?

Regards,