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:
Peripheral:
Clocks:
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.
Solved! Go to Solution.
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
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
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