- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
SmartIO Configuration
LUT 6
PWM Config
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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