- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have setup a PSOC6 project using CY8CKIT-062-WiFi-BT as my device. I have configured a digital PIN and assigned P0_3 to it. P0_3 maps to RED LED in RGB from schematics. I am able to blink the LED when used in for loop but not outside of it.
In main_cm4.c,
The following is working:
int main(void)
{
for(;;)
{
Cy_GPIO_Write(LED_R_PORT, LED_R_NUM, 1);
CyDelay(500);
Cy_GPIO_Write(LED_R_PORT, LED_R_NUM, 0);
CyDelay(500);
}
}
But this is not turning the LED on.
int main(void)
{
Cy_GPIO_Write(LED_R_PORT, LED_R_NUM, 1);
for(;;)
{
}
}
Why?
The GPIO is configured as Digital output with no hardware connection. The initial drive state is low.
Thanks
Dheeraj
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
All the user LEDs are active low, so a Cy_GPIO_Write(LED_R_PORT, LED_R_NUM, 0); will turn it on.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
All the user LEDs are active low, so a Cy_GPIO_Write(LED_R_PORT, LED_R_NUM, 0); will turn it on.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh okay. I didn't find active low symbol in the schematics. Can you point me to the docs where this information is present?
Thanks
Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you installed the CY8CKIT-062 correctly there will be an entry for the complete description in C:\Program Files(x86)\Cypress\...
When you follow the ...\Hardware\... path there you will find a schematics PDF. Search for "user LED"
Happy coding
Bob