Hello,
I am testing coding with RUI and I found my code didn’t work.
I noticed that the timers trigger immediately and repeating timers never repeat.
I then wrote some simple testing codes (included at the end) with a clean project and verified that the problem persists.
Please help investigating/pointing out whether I have configured anything incorrectly.
I am using RAK811 Version:3.0.0.14.H with the online compiler
Expected result: UART1 prints “Preparing timer” immediately, then prints “Timer callback interval: 5s” every 5s.
Observed result: UART1 prints “Preparing timer” then “Timer callback interval: 5s” immediately
Oops my bad
Regarding the simple test code,
I copied the wrong code. It was indeed 5ms.
But setting test_timer.timer_mode = RUI_TIMER_MODE_REPEATED;
still have no effect.
Regarding my main testing code,
it was already *1000. I will check it again and see what went wrong.
How many timers can be used simultaneously on RAK811?
I was actually using 2 timers in the main test code to
trigger reading data from UART3 which is written into a buffer during rui_uart_recv()
trigger writing data to UART3 periodically to request data from external devices
Now I have rewritten the simple test code to test the timer based mechanism and remove as many source of error as possible.
And I found that triggering the read timer during the write timer would triggers “hard fault exception” with messages as the following:
Is there any updates on the issue regarding:
a) timer doesn’t repeat even if timer_mode is set to RUI_TIMER_MODE_REPEATED, and
b) using 2 timers simultaneously on RAK811?
For (a), I can still work around it by restarting the timer in the callback.
For (b), I think I can work around it by using a counter to track the cycle with combination of (a).
But I still wish to retain as much time resolution as possible.
Is there any methods to acquire a timer value like in millis() in Arduino?
Would there be conflicts with RUI if I use SysTick as described in here ?
i have almost same issue at RAK811-H online compiler
my case is timer call-back interrupt can not serviced after LoRa Message sending at P2P mode
i think, last week did not occur this interrupt problem
Now I’m testing what’s the problem
Is there an API to know if timer interrupt is running?
thanks.
Best Regards
HR-Cho