2026-02-03 10:10 AM
Hello,
Regarding current implementation of wrapper timers in st87ec library, we have a few questions:
Best regards,
Kamil.
Solved! Go to Solution.
2026-02-04 7:05 AM
Hello Kamil,
In our basic code example, this is correct the calling of lib scheduler is called in while loop preventing the U5 to go in sleep. This was done to demo how to interfere with EC lib, not a real application.
What you need to know:
1) the wrapper part deals with the ST87M01 HW pins, specially the UART pins that are handled by Rx/Tx interrupts. So basically, the buffers are filled in even though the lib scheduler won't be called, buffer is circular around 2KB
2) the sequencer part is scheduled by calling the lib_scheduler, the internal timers are updated on interruption of the Tick ISR. We keep 1ms basis so it match with the ST87M01 timeout.
So you can change the tick resolution but you'll need to adjust the function of timer update so it still keep the 1ms update.
You can also call the lib scheduler in RTOS task or on timer tick to let the U5 going in sleep the rest of time.
Be aware that EClib requires the module to go in sleep mode right away the sequence is ended. For now, you can decide what kind of sleep mode into the config file. PSM is set by default, but you could change it to EDRX.
regards,
Hervé
2026-02-04 7:05 AM
Hello Kamil,
In our basic code example, this is correct the calling of lib scheduler is called in while loop preventing the U5 to go in sleep. This was done to demo how to interfere with EC lib, not a real application.
What you need to know:
1) the wrapper part deals with the ST87M01 HW pins, specially the UART pins that are handled by Rx/Tx interrupts. So basically, the buffers are filled in even though the lib scheduler won't be called, buffer is circular around 2KB
2) the sequencer part is scheduled by calling the lib_scheduler, the internal timers are updated on interruption of the Tick ISR. We keep 1ms basis so it match with the ST87M01 timeout.
So you can change the tick resolution but you'll need to adjust the function of timer update so it still keep the 1ms update.
You can also call the lib scheduler in RTOS task or on timer tick to let the U5 going in sleep the rest of time.
Be aware that EClib requires the module to go in sleep mode right away the sequence is ended. For now, you can decide what kind of sleep mode into the config file. PSM is set by default, but you could change it to EDRX.
regards,
Hervé