cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

Anonymous
Not applicable

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;

   
     How do I get a static high on this pin?   
   
        
0 Likes
Reply
3 Replies
Anonymous
Not applicable

 Hi,

   

We will test this internally and let you know by tomorrow.

   

Regards,

   

-Madhu Sudhan

0 Likes
Reply
Anonymous
Not applicable

 Hi,

   

I tried this. I could get a static high on the pin.

   

Please create a Tech support case.

   

Regards,

   

- Madhu Sudhan

0 Likes
Reply
New Contributor

I had the same problem and the only thing that worked for me was this (disabling the pin and reconfiguring from scratch):

Switch on/off complex PWM

0 Likes
Reply