Questions and discussions about the software that runs on the TD RF module itself.
leosw
 
Posts: 17
Joined: Wed Apr 06, 2016 9:46 am

Switching to EM2 mode

by leosw Fri Apr 15, 2016 9:06 am

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.
User avatar
lcheminade
 
Posts: 146
Joined: Mon May 11, 2015 7:47 am

Re: Switching to EM2 mode

by lcheminade Fri Apr 15, 2016 9:18 am

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.
leosw
 
Posts: 17
Joined: Wed Apr 06, 2016 9:46 am

Re: Switching to EM2 mode

by leosw Fri Apr 15, 2016 9:31 am

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
leosw
 
Posts: 17
Joined: Wed Apr 06, 2016 9:46 am

Re: Switching to EM2 mode

by leosw Fri Apr 15, 2016 10:37 am

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.
omlu
 
Posts: 46
Joined: Tue Oct 06, 2015 8:27 am

Re: Switching to EM2 mode

by omlu Wed Apr 27, 2016 12:24 pm

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,
Return to Firmware

Who is online

Users browsing this forum: No registered users and 35 guests