PSoC 4100S Plus PWM output seems to be different via SmartIO

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

cross mob
lock attach
Attachments are accessible only for community members.
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

Today one of my colleagues encountered an interesting phenomenon.

He was using a CY8CKIT-149.

He connected an output of a PWM to an output pin LED13 (P5[5]) and to data7 of SmartIO.

The SmartIO was configured just like a jumper wire (1->1, 0->0) and its gpio6 was connected to LE8 (P1[6]).

When both PWM and SmartIO were Start()ed, both LEDs were blinking together.

But when PWM_Stop() was called, LED8 was ON but LED13 was OFF.

We were expecting that both LEDs should behave similarly as their logic come from the same line_n of PWM.

Since LED8 was ON, we assumed that the line connected to data7 of SmartIO is LOW,

then LED13 which is connected to the same line should be LOW, too.

And if it is so, LED13 should be ON.

[ QUESTION! ] Could someone teach us why this is happening?

To reproduce the phenomenon, I made following simplified project.

Schematic

Pin Assignment

001-pin-assignment.JPG

SmartIO Configuration

002-SmartIO-Config.JPG

LUT 6

003-LUT6.JPG

PWM Config

004-PWM-Config.JPG

main.c

=================

#include "project.h"

/**

* LED8  is connected to SmartIO

* LED13 is conncted to PWM line_n

*/

int main(void)

{

    CyGlobalIntEnable; /* Enable global interrupts. */

   

    SmartIO_Start() ; // (A) LED8 is ON and LED13 is OFF

   

    PWM_Start() ;     // (B) both LED8 and LED13 blink synchronizedly

    CyDelay(3000) ;   // (C) let LEDs blink for 3 seconds

    PWM_Stop() ;      // (D) LED8 is ON and LED13 is OFF

   

    SmartIO_Stop() ;  // (E) both LED8 and LED13 is OFF

    for(;;)          

    {

                     // rest is silence

    }

}

=================

moto

0 Likes
1 Solution
RyanZhao
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Tanaka-san,

Thank you for your update on the topic.

We welcome any study and research on Cypress product application which is a key to help us move on continually.

Regarding the phenomenon, output PIN (port) of PWM is high-Z(as per HSIOM configuration) so that PWM output LED turns off.

Yes. I think so. SmartIO treats disabled signal ("line" of PWM) as LOW (When I change LUT6 logic to 0 0 0->1, 1 1 1->). After PWM_Stop(), SmartIO output will be high, and SmartIO LED turned off.  

Best Regards,

Ryan

View solution in original post

0 Likes
8 Replies