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

lock attach
Attachments are accessible only for community members.
ALDE_1053476
Level 3
Level 3
10 replies posted 10 questions asked 10 sign-ins

Hello,

I created a simple Test Project using a PWM and SMARTIO on Port 2.

The target is to invert PWM Output Polarity (like in your document CE209976) and route to two different Pins (like in Your document CE209975)

I've used CY8CKIT-145 (4000S prototyping Kit) and routed the signals to P2.4 and P2.5.

I Cannot Observe any signal on P2.5, while P2.4 Outputs signal whit a polarity opposite than expected.

Thanks,

Alfonso

1 Solution
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi ALDE_1053476

The problem is with the firmware.

You have not enabled the smartIO in the main.c and hence, that block is inactive.

Please try with the updated firmware

int main(void)

{

    CyGlobalIntEnable; /* Enable global interrupts. */

    PWM_Start ();

    /* Place your initialization/startup code here (e.g. MyInst_Start()) */

    SmartIO_1_Start();

    for(;;)

    {

        /* Place your application code here. */

//        Pin_2_Write (0);

//        CyDelay (500);

//        Pin_2_Write (1);

//        CyDelay (500);

    }

}

Also, please note that if a pin has a hardware connection (like in this case where it is driven by PWM through SmartIO), the Pin_Write APIs must not be used.

Best regards,
Hari

View solution in original post

0 Likes
1 Reply
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi ALDE_1053476

The problem is with the firmware.

You have not enabled the smartIO in the main.c and hence, that block is inactive.

Please try with the updated firmware

int main(void)

{

    CyGlobalIntEnable; /* Enable global interrupts. */

    PWM_Start ();

    /* Place your initialization/startup code here (e.g. MyInst_Start()) */

    SmartIO_1_Start();

    for(;;)

    {

        /* Place your application code here. */

//        Pin_2_Write (0);

//        CyDelay (500);

//        Pin_2_Write (1);

//        CyDelay (500);

    }

}

Also, please note that if a pin has a hardware connection (like in this case where it is driven by PWM through SmartIO), the Pin_Write APIs must not be used.

Best regards,
Hari

0 Likes