Can LPTMR toggle a pin during Very Low Leakage Stop 3 in KL05?

cancel
Showing results for 
Search instead for 
Did you mean: 

Can LPTMR toggle a pin during Very Low Leakage Stop 3 in KL05?

339 Views
diegocolombo
Contributor IV

Hi

having to do with a battery application, i would like to know if it is possible to have a GPIO out turned high and low by LPTMR during stop mode.

It would be even better if a specific duty cycle could be obtained,for example 100 ms OFF,10 ms ON.

Thanks.

Diego

Tags (1)
0 Kudos
2 Replies

93 Views
diegocolombo
Contributor IV

Thanks Mark,

you made me notice that my question was uncorrect,I would have rather had to write " if it is possible to have a pin  turned high and low" instead of  "if it is possible to have a GPIO out turned high and low",because of the frozen state of the GPIO's in VLLS3

Anyway you just confirmed that there is no way to toggle a pin in VLLS3 because there is no way to route the LPTMR output

on any pin.

Sometime i have to do with periodic wake up from the LPTMR ,but in this case it is not worth it,the wake up should be too frequent,just for saving few uAh s polling  a sensor .

Thanks for avoiding me to spend time in a wrong direction.

0 Kudos

93 Views
mjbcswitzerland
Specialist V

Hi Diego

- VLLS3 retains SRAM state and latches I/O pads, but requires a reset to return to RUN mode.
- Since the the LPTMR doesn't have any outputs port, toggling needs to be done by SW (regular wake up to RUN mode).

This means that to do what you require you would need to program the LPTMR to wake the processor, which will cause a SW reset each time. You will then need to use a retained value (in SRAM), or the latched GPIO state to determine the next time delay required, toggle the output and return to VLLS3. Then repeat periodically to achieve the port togging and remain in VLLS3 as much of the time as possible.

Due to the frequent wake-up (and wake-up time involved) it may be that the average current consumption is not as low as you would like it to be. I haven't tested this operation so can't say what the exact relationships is so you will need to measure the average power consumption to see whether it is acceptable.

Regards

Mark