cancel
Showing results for 
Search instead for 
Did you mean: 

ST87M01 EasyConnect Timer implementation

Kamil_P
Associate

Hello,

 

Regarding current implementation of wrapper timers in st87ec library, we have a few questions:

  1. Is it fine to change implementation of tick resolution? Lets say if we have tick every 1 microsecond, if we change implementation of wrapper timer by multiplying by 1000, will it affect any other parts of library?
  2. Is there a plan to change implementation to interrupt driven for low power applications?
  3. What is expected longest timeout which requires waking up every 1ms?
  4. Is there sequence to put st87 to PSM?

 

Best regards,

Kamil.

1 ACCEPTED SOLUTION

Accepted Solutions
hperruchas
ST Employee

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é

View solution in original post

1 REPLY 1
hperruchas
ST Employee

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é