K20 FTM synchronization by PDB

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

K20 FTM synchronization by PDB

740 次查看
venny
Contributor I

I am trying to make a BLDC controller. Commutation period is set by PDB0 in continuous mode, PWM with appropriate masking is done by FTM0, which is reloaded and restarted synchronously with PDB0 overflow.

I was able to set up trigger signal generation by enabling PDB channel 1, pretrigger 0.

However, now it is necessary that ADC1 is powered up and waiting for interrupt to read R[0], otherwise COCO remains set, PDB detects sequence error and halts trigger generation.

Is there any way to use PDB for FTM synchronization while ADC1 is off, or is used for other unrelated tasks?

Thanks for any suggestions

标签 (1)
0 项奖励
回复
1 回复

644 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi,

It seems there is no way to do so. PDP channel is specially design for ADC.

"When a pre-trigger from a PDB channel n is asserted, the associated lock of the pretrigger becomes active. The associated lock is released by the rising edge of the corresponding ADCnSC1[COCO]; the ADCnSC1[COCO] should be cleared after the conversion result is read, so that the next rising edge of ADCnSC1[COCO] can be generated to clear the lock later. The lock becomes inactive when:
• the rising edge of corresponding ADCnSC1[COCO] occurs,

• or the corresponding PDB pre-trigger is disabled,
• or the PDB is disabled"

There is a topic about PDB, you can also take a look. You can't eliminate sequence error without coco.

https://community.nxp.com/message/927844?commentID=927844#comment-927844

Regards,

Jing

0 项奖励
回复