SDK Driver Example project "pwm" - outputs not working FRDM-MCXA153 (FLEXPWM0 example)

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

SDK Driver Example project "pwm" - outputs not working FRDM-MCXA153 (FLEXPWM0 example)

2,055 Views
marks
Contributor IV

Hello,

Tried a few SDK example projects for my newly purchased FRDM-MCXA153 board. All seem to work except the pwm project (Located at SDK_2_16_000_FRDM-MCXA153\boards\frdmmcxa153\driver_examples\pwm). It does not output any pulses at these test points as expected.

(from readme.md)
* Probe the pwm signal using an oscilloscope
- ADC PWM0_A0 output signal J3-15(PIO3_6).
- ADC PWM0_B0 output signal J3-13(PIO3_7).
- ADC PWM0_A1 output signal J3-11(PIO3_8).
- ADC PWM0_A2 output signal J3-7(PIO3_10).

I know the code is running. I get "FlexPWM driver example" displayed in the terminal. I can see values changing in the FLEXPWM0 component. These FLEXPWM0 component registers change each time I loop through main:

SM0CNT
SM0VAL2
SM0VAL3

So I can see a lot is working. Just nothing on the expected outputs. Has anybody else had same experience?

Seemed like the clock to GPIO3 was never enabled. So I added this line of code, in pin_mux.c, in the BOARD_InitPins(void) function:

/* Write to GPIO3: Peripheral clock is enabled */
CLOCK_EnableClock(kCLOCK_GateGPIO3);

And PRESTO! It started working. Hope this helps someone that was stuck like I was.

Best regards,

Mark

 

 

Labels (2)
0 Kudos
Reply
1 Reply

2,025 Views
Harry_Zhang
NXP Employee
NXP Employee

Hi @marks 

I tested the pwm example.( SDK_2_16_000_FRDM-MCXA153\boards\frdmmcxa153\driver_examples\pwm)

It can work.

You can check my picture.

Hope this will help you.

BR

Hang

0 Kudos
Reply