- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have an application where a GPIO pin must be driven with a PWM signal, but not all the time. The PWM output must be turned off sometimes.
I can get the PWM signal to work just fine. However, I cannot figure out how to get it to stop and output static high and low values. This configures the PWM:
gpioCplxConfig.driveHighEn = CyTrue;
gpioCplxConfig.driveLowEn = CyTrue;
gpioCplxConfig.inputEn = CyFalse;
gpioCplxConfig.outValue = CyFalse;
gpioCplxConfig.intrMode = CY_U3P_GPIO_NO_INTR;
gpioCplxConfig.pinMode = CY_U3P_GPIO_MODE_PWM;
gpioCplxConfig.timerMode = CY_U3P_GPIO_TIMER_LOW_FREQ;
gpioCplxConfig.timer = 0x00000000;
gpioCplxConfig.period = 0x00010000;
gpioCplxConfig.threshold = 0x00008000;
I think this should configure a static high on the pin but it doesn't work. The pin stays low.
gpioCplxConfig.driveHighEn = CyTrue;
gpioCplxConfig.driveLowEn = CyTrue;
gpioCplxConfig.inputEn = CyFalse;
gpioCplxConfig.outValue = CyTrue;
gpioCplxConfig.intrMode = CY_U3P_GPIO_NO_INTR;
gpioCplxConfig.pinMode = CY_U3P_GPIO_MODE_STATIC;
gpioCplxConfig.timerMode = CY_U3P_GPIO_TIMER_SHUTDOWN;
gpioCplxConfig.timer = 0x00000000;
gpioCplxConfig.period = 0x00000000;
gpioCplxConfig.threshold = 0x00000000;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We will test this internally and let you know by tomorrow.
Regards,
-Madhu Sudhan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I tried this. I could get a static high on the pin.
Please create a Tech support case.
Regards,
- Madhu Sudhan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had the same problem and the only thing that worked for me was this (disabling the pin and reconfiguring from scratch):