5 Replies Latest reply on Mar 8, 2018 8:53 AM by user_497030312

    psoc4200l TCPWM strange behaviour

    user_497030312

      Hello,

       

      I configure 4 absolutely identical PWM modules, which are clocked from a single clock. When I Start them they are working, when I stop them and after that Start again, PWM on pin P1.4 (tcpwm 7) does not start . All the others run perfect, only TCPWM 7 (port 1.4 ) doe snot work. The device is CY8C4248LTI-L475. I looked in the Errat, but could not find the any errata documentation.

      It is urgent. I lost 2 days trying to see where is the problem.

       

      Thank you

        • 1. Re: psoc4200l TCPWM strange behaviour
          bob.marlowe

          Can you please post your complete project or a shortened version that shows the error so that we all can have a look at all of your settings. To do so, use

          Creator->File->Create Workspace Bundle (minimal)

          and attach the resulting file.

           

          Bob

          • 2. Re: psoc4200l TCPWM strange behaviour
            user_497030312

            Attached is the project. When you run it you will see that all of TCPWM goes on and off in certain time interval, just P1.4 does not.

            • 3. Re: psoc4200l TCPWM strange behaviour
              user_78878863

              Did you check that on your board nothing else is connected to that pin?

              • 4. Re: psoc4200l TCPWM strange behaviour
                user_497030312

                It is not a connection issue. It is connected motor driver IC, but I have 2 boards and the both of them behaves in the same way.

                If I just run the PWMs without cycle stop and start, then I have the proper signal on pin 1.4.

                I think that there is something wrong with the library/drivers provided by Cypress, but I could not trace where exactly the problem is. It looks like there is any collision after I invoke xxxStop() and after that xxxStart() . 

                • 5. Re: psoc4200l TCPWM strange behaviour
                  user_497030312

                  To be 100% correct, it is not only TCPWM Start/Stop cycling.

                  The issue happens when I call void Motor1ABInit() function, where I set manually pin1.4 (AEN_1) low.

                  I do with all the other PWM outputs the same, but they are ok with this. Only pin1.4 locks in '0'.

                   

                  If I make this (comment the line):

                  void Motor1ABInit()

                  {

                      PWM_M1A_Stop();

                      PWM_M1B_Stop();

                    // AEN_1_Write(LOW);       // disable driver

                      APHASE_1_Write(LOW);    // set direction to LOW

                      BEN_1_Write(LOW);       // disable driver

                      BPHASE_1_Write(LOW);    // set direction to LOW

                      Sleep_1_Write(LOW);     // disable driver

                  }

                   

                  then it is working as expected. But as you see I do not comment BEN_1_Write and it is working ok.