Read FTMx_CnV in Output Compare Mode

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Read FTMx_CnV in Output Compare Mode

1,777 次查看
aberger
Senior Contributor I

In output compare mode, does reading the FTMx_CnV register return the buffered value, or the loaded value? 

1. Under an FTM overflow interrupt, I am calculating an output compare value and loading it into the FTMx_CnV buffer for loading at the next loading point (which I have configured as CNTMIN).

2. During that same interrupt cycle (i.e. before reaching the loading point), it's possible that I've also experienced an output compare match to the previously loaded CnV value. I would like to read that loaded CnV value and not the recently buffered value. Is this possible, or will reading the FTMx_CnV value return the recently buffered value from step (1). 

标记 (2)
0 项奖励
回复
3 回复数

1,686 次查看
Alexis_A
NXP TechSupport
NXP TechSupport

Hello Andy, 

Can you let me know which MCU are you using?

Best Regards,

Alexis Andalon

0 项奖励
回复

1,686 次查看
aberger
Senior Contributor I

I'm using a K64 (MK64FN1M0VMD12, specifically)

0 项奖励
回复

1,686 次查看
Alexis_A
NXP TechSupport
NXP TechSupport

Hello Andy,

I see that you are using the same channel in output compare mode and as overflow. These two modes can interfere between them. So it will be better if you use independent channels for each of the events.

Best Regards,

Alexis Andalon

0 项奖励
回复