No synchronization between PWM and ADC ETC

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

No synchronization between PWM and ADC ETC

8,658 Views
kabraham_abin
Contributor I

Trying to get SM0VAL4  trigger from PWM to ADC ETC and found no trigger is coming to ADC ETC. As troubleshooting I tried to read the counter register SM0SMCNT. please find attached image named SM0SMCNT.jpeg. Is this an expected counter response(a sudden jump in the middle from 6000 to 60000)?.Also, there is no duty cycle response in the FreeMaster .

In addition, I tried to run the pwm_center_aligned example from the model based design tool box and I couldn't get any response in the FreeMaster either. what could be wrong?  

Labels (1)
0 Kudos
Reply
6 Replies

8,625 Views
kabraham_abin
Contributor I

Hi @xiangjun_rong ,
I verified the value4 trigger is enabled in PWM2_submodule 0 trigger control register through Freemaster software. please refer the below screen capture on read back values of that register other config registers for PWM and ADC ETC. Also the trigger is mapped to ADC_ETC. Please refer the attached image named ADC_ETC. Its still not working

0 Kudos
Reply

8,614 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Pls make sure that the sub-module of FlexPWM module is working, for example the PWM can output PWM signal.

You can copy the SDK PWM example to this project

BR

XiangJun Rong

0 Kudos
Reply

8,610 Views
kabraham_abin
Contributor I
Hi XiangJun Rong,
That is what I was also doubted and I asked the below post in the forum
https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/PWM-block-not-working/m-p/1562757#M7899
and still waiting for a reply.
0 Kudos
Reply

8,582 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

There is FlexPWM module example in SDK package in the driver_examples, I suppose that you can copy the driver and application code to the ADC-ETC example.

 

xiangjun_rong_1-1670406114429.png

Hope it can help you

BR

XiangJun Rong

0 Kudos
Reply

8,632 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I suppose that you can refer to the ADC example adc_etc_hardware_trigger_conv:

xiangjun_rong_0-1670215067020.png

Pls just change the void XBARA_Configuration(void) so that the PWM triggering can trigger ADC

void XBARA_Configuration(void)
{
/* Init xbara module. */
XBARA_Init(DEMO_XBARA_BASE);

/* Configure the XBARA signal connections. */
//XBARA_SetSignalsConnection(DEMO_XBARA_BASE, DEMO_XBARA_INPUT_PITCH0, //DEMO_XBARA_OUTPUT_ADC_ETC);
XBARA_SetSignalsConnection(DEMO_XBARA_BASE, kXBARA1_InputFlexpwm1Pwm1OutTrig01, DEMO_XBARA_OUTPUT_ADC_ETC);
}

while you have to set the PWM trigger register so that the VALUE4 register of PWM can trigger ADC.

xiangjun_rong_1-1670215375055.png

 

Hope it can help you

BR

XiangJun Rong

0 Kudos
Reply

8,618 Views
kabraham_abin
Contributor I
It didn't solve my problem.
0 Kudos
Reply