FTM triger ADC through Trigmux and PDB for center aligned PWM

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

FTM triger ADC through Trigmux and PDB for center aligned PWM

367 次查看
Kapila
Contributor II

Document Number: AN5303

In motor drive control for continuous ADC triggering FTM is used. The code is explained in AN5303.

However it is not clear from S32K RM how address or the MUX slected. 

Configure the TRGMUX module to trigger ADC0 by FTM0 through the PDB0 module by writing 0x16 to the SEL0 bit field in the TRGMUX_PDB0 register.

I could not understand how 0X16 is generated.

Thanks for explaining.

Regards,

Kanakaraju kappila 

0 项奖励
回复
1 回复

345 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @Kapila 

 /* Set FTM as a trigger source for PDB0 */
 TRGMUX->TRGMUXn[TRGMUX_PDB0_INDEX] = TRGMUX_TRGMUXn_SEL0(0x16);

If you refer to section 19.4.1.1 (TRGMUX memory map) of the S32K1xx Series Reference Manual, Rev. 13, you can see Table 19-1 (Select Bit Fields) provides the list of the trigger inputs of the TRGMUX and the corresponding value to selects as the output. So, as it is shown in the following image, the 0x16 corresponds to FTM0. 

VaneB_0-1706128502565.png

 

B.R

VaneB

0 项奖励
回复