PWM Issue in i.MXRT1051xxxB

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

PWM Issue in i.MXRT1051xxxB

Jump to solution
1,080 Views
RobertoRdz
Contributor I

Hi,

Currently, I have an issue with the PWM. My objective is to generate a 10 kHz signal with a duty of 50%.

Just that, nothing from another world. But reviewing it with my oscilloscope I doesn't work.

I'm using the MCUXpresso v8. My config is the next one:

GPIO:

RobertoRdz_0-1625282165503.png

 

RobertoRdz_1-1625282225155.png

Peripheral:

RobertoRdz_2-1625282321804.pngRobertoRdz_3-1625282351623.png

RobertoRdz_4-1625282374064.png

RobertoRdz_5-1625282443704.png

Clocks:

RobertoRdz_6-1625282569004.png

 

I'm not looking for interruptions, for anything else. I already tested using:
XBARA_Init(XBARA1);
XBARA_SetSignalsConnection(XBARA1, kXBARA1_InputLogicHigh, kXBARA1_OutputFlexpwm1Fault0);
XBARA_SetSignalsConnection(XBARA1, kXBARA1_InputLogicHigh, kXBARA1_OutputFlexpwm1Fault1);
XBARA_SetSignalsConnection(XBARA1, kXBARA1_InputLogicHigh, kXBARA1_OutputFlexpwm1234Fault2);
XBARA_SetSignalsConnection(XBARA1, kXBARA1_InputLogicHigh, kXBARA1_OutputFlexpwm1234Fault3);

But nothing helps, and I'm really desperate.

If someone can help me, I would appreciate it a lot.

Thanks in advance.

0 Kudos
Reply
1 Solution
1,070 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi  @RobertoRdz 

Which RT1050 board you are testing? NXP official board or your own customer board?

  If it is the NXP MIMXRT1050-EVKB, please note, your GPIO_SD_B1_01 will conflict with the on board hyperflash FlexSPI_D2_B.

  I suggest you test the SDK PWM code at first:

SDK_2.9.1_EVKB-IMXRT1050\boards\evkbimxrt1050\driver_examples\pwm

  If it works OK, you can use the CFG tool configure the same operation again, whether it works, your pinmux.c configuration still lack the IOMUXC_SetPinConfig code, eg:

IOMUXC_SetPinConfig(
IOMUXC_GPIO_SD_B0_01_FLEXPWM1_PWMB00, /* GPIO_SD_B0_01 PAD functional properties : */
0x10B0u); /* Slew Rate Field: Slow Slew Rate
Drive Strength Field: R0/6
Speed Field: medium(100MHz)
Open Drain Enable Field: Open Drain Disabled
Pull / Keep Enable Field: Pull/Keeper Enabled
Pull / Keep Select Field: Keeper
Pull Up / Down Config. Field: 100K Ohm Pull Down
Hyst. Enable Field: Hysteresis Disabled */

You can refer to the SDK code to configure it.

Please test the SDK code at first, then you can use the same pin as the SDK to test it.

If you still have questions about it, please kindly let me know.

Best Regards,

Kerry

 

View solution in original post

0 Kudos
Reply
2 Replies
1,071 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi  @RobertoRdz 

Which RT1050 board you are testing? NXP official board or your own customer board?

  If it is the NXP MIMXRT1050-EVKB, please note, your GPIO_SD_B1_01 will conflict with the on board hyperflash FlexSPI_D2_B.

  I suggest you test the SDK PWM code at first:

SDK_2.9.1_EVKB-IMXRT1050\boards\evkbimxrt1050\driver_examples\pwm

  If it works OK, you can use the CFG tool configure the same operation again, whether it works, your pinmux.c configuration still lack the IOMUXC_SetPinConfig code, eg:

IOMUXC_SetPinConfig(
IOMUXC_GPIO_SD_B0_01_FLEXPWM1_PWMB00, /* GPIO_SD_B0_01 PAD functional properties : */
0x10B0u); /* Slew Rate Field: Slow Slew Rate
Drive Strength Field: R0/6
Speed Field: medium(100MHz)
Open Drain Enable Field: Open Drain Disabled
Pull / Keep Enable Field: Pull/Keeper Enabled
Pull / Keep Select Field: Keeper
Pull Up / Down Config. Field: 100K Ohm Pull Down
Hyst. Enable Field: Hysteresis Disabled */

You can refer to the SDK code to configure it.

Please test the SDK code at first, then you can use the same pin as the SDK to test it.

If you still have questions about it, please kindly let me know.

Best Regards,

Kerry

 

0 Kudos
Reply
1,051 Views
RobertoRdz
Contributor I

Thank you Kerry,

I was using custom board hardware.

Indeed it works, I tried the SDK pwm code in my hardware and I modify it for my need.

Kind regards,

Roberto

0 Kudos
Reply