psoc4200l TCPWM strange behaviour

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
PeGu_352656
Level 2
Level 2

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

0 Likes
5 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

0 Likes

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.

0 Likes

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

0 Likes

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() . 

0 Likes

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.

0 Likes