How is the demo_apps_adc16_low_power working if LPTMR is not configured as Free-Running?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How is the demo_apps_adc16_low_power working if LPTMR is not configured as Free-Running?

ソリューションへジャンプ
1,206件の閲覧回数
m4l490n
Contributor V

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?

0 件の賞賛
返信
1 解決策
1,199件の閲覧回数
mjbcswitzerland
Specialist V

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

元の投稿で解決策を見る

1 返信
1,200件の閲覧回数
mjbcswitzerland
Specialist V

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