2019-07-26 08:34 AM
Hi, i am trying to change the APP_TX_DUTYCYCLE in my bl072z board without success, the idea is to receive a downlink message and change this time remotely, i have tried this:
(all this attempts are inside a callback function activated by a button interrupt so the code is executed just once)
APP_TX_DUTYCYCLE = 20000;
LoraStartTx( TX_ON_TIMER);
APP_TX_DUTYCYCLE = 20000;
TimerReset(&TxTimer);
TimerSetValue( &TxTimer, APP_TX_DUTYCYCLE);
OnTxTimerEvent( NULL );
but nothing works, the program just stop running and does not send data never again, i am just trying to emulate the original flow of the code because i know that function LoraStartTx( TX_ON_TIMER); is called at top of the code just once to load the APP_TX_DUTYCYCLE, then calls OnTxTimerEvent function which triggers the condition to send the data every APP_TX_DUTYCYCLE time, i dont know if is recommended to try change the time while the code is running but if someone has any idea would be helpful, i will continue making tests to fix this, thanks