K20 FTM synchronization by PDB

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

K20 FTM synchronization by PDB

350 Views
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

Labels (1)
0 Kudos
1 Reply

254 Views
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 Kudos