I'm checking out the demo_apps_adc16_low_power sample application and I found something odd. The application is reading the internal temp sensor via the ADC0 which has the hardware trigger enabled and set to be the LPTMR overflow. If I understand correctly, this means that the conversion for the internal chip temp sensor will not be triggered until LPTMR overflows.
The example application has a main loop where the internal temp sensor is checked based on the conversionCompleted variable which is set to true on the DEMO_ADC16_IRQ_HANDLER_FUNC periodically.
My question is, how come this is working if the LPTMR is not set to free-running? Doesn't this mean that there would be just one conversion?
I understand that if a timer is NOT free-running then it will just overflow once and if another cycle is needed it should be started explicitly by software. So, how is this example working?
Solved! Go to Solution.
Hi
When not in FREE-Running mode the LPTMR will reset to 0 each time the match value is reached.
It continues running and doesn't need to be restarted by SW.
The difference between this and FREE-Running mode is that after the match the counter continues incrementing (not restarting at 0 until it overfows after 0xffff) - but in neither case does it stop.
Regards
Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or rapid product development requirements
For professionals searching for faster, problem-free Kinetis and i.MX RT 10xx developments the uTasker project holds the key
Hi
When not in FREE-Running mode the LPTMR will reset to 0 each time the match value is reached.
It continues running and doesn't need to be restarted by SW.
The difference between this and FREE-Running mode is that after the match the counter continues incrementing (not restarting at 0 until it overfows after 0xffff) - but in neither case does it stop.
Regards
Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or rapid product development requirements
For professionals searching for faster, problem-free Kinetis and i.MX RT 10xx developments the uTasker project holds the key