Cypress PSoC6: Having trouble running the basic blinky program! - Page 1
Forum section: electronics / general

author: Jdo300
author_rank: Newbie
timestamp: March 24, 2021, 06:27:33 pm
content: I have a Cypress PSoC 6.3 Pioneer Kit (HW REV 11) and am having trouble running any of my own (or example) programs on the PSoC.I have the latest PSoC Creator (V4.4) installed with PDL V3.1.4 and the latest KitProg firmware update (Firmware version 2.10.878). I just created a new example project in PSoC Creator of the DualCoreBlinky application and compiled an ran it. It compiles just fine, and seems to program just fine, but nothing happens on the board (no blinking LED). I confirmed that the KitProg light blinks momentarily while it is uploading the firmware so it seems that the board is responding. No noticeable errors or warnings in PSoC Creator.To troubleshoot, I tried running the debugger with a breakpoint set at the beginning of the Main function of the M0+ core. When I set the Target to the M0+ and hit debug, PSoC Creator jumps to the debug view but never halts at the breakpoint I set. When I hit the pause button. I'm dropped into a disassembly somewhere and if I press the step into or step over buttons, nothing changes. If I press the step out button, I get the error: "The run request failed. Encountered error (Warning: Cannot insert breakpoint 0. Cannot access memory at address 0x160022a6 )"I also tried making my own blank program on the CM0+ core to blink the LED with the following code inside the for loop for the CM0+ core:Code:/* Place your application code here. */Cy_GPIO_Write(LED_0_PORT, LED_0_NUM, 1);CyDelay(500);Cy_GPIO_Write(LED_0_PORT, LED_0_NUM, 0);CyDelay(500);NOTE: I created a digital pin in the schematic called LED and connected it to Pin 0 on the chip.But again, the same problem. It programs fine but nothing happens, and I can't step through the code. Any idea what is going on? I'm hitting a brick wall here so far.

author: mon2
author_rank: Frequent Contributor
timestamp: March 25, 2021, 07:51:17 pm
content: Hi.1) What is the exact kit # on your box / PCB that you own?2) See here:https://www.cypress.com/documentation/development-kitsboards/psoc-6-ble-pioneer-kit-cy8ckit-062-ble3) Suggest to post your question also on the Cypress forum. They are quite good but most of their staff is offshore that handles the technical support.4) Newark has a good getting started tutorial but am concerned if your kit is still supported by the latest toolchain. Do post more details of the kit you own and check the above link to see if the tools support your kit.https://www.element14.com/community/roadTestReviews/2648/l/cypress-psoc-6-ble-pioneer-kit-cy8ckit-062-ble-review

author: SuzyC
author_rank: Frequent Contributor
timestamp: March 26, 2021, 02:49:02 am
content: Might be that you have the WDT (watchdog timer) on and no code to reset it or turn it off, so your program is continually rebooting during the pauses in your blinky pgm.

author: rstofer
author_rank: Super Contributor
timestamp: March 26, 2021, 06:22:00 pm
content: On the back of my BLE, there is a legend that shows the pinout and the Red LED is on port 13 pin 7Make sure you have selected the proper device in Project -> Device SelectorYou might try to substitute literal values for the port/pin and skip the supplied constants. I haven't tried this and I don't know if it works.Search Google for the PSOC6101 videos and follow alonghttps://www.cypress.com/training/psoc-101-video-tutorial-series-how-use-arm-cortex-m0-based-psoc-4https://www.cypress.com/training/psoc-6-101-chapter-1-getting-started-psoc-6-mcus

author: rstofer
author_rank: Super Contributor
timestamp: March 26, 2021, 10:00:25 pm
content: So I downloaded PSOC Creator 4.4 into a machine that never had anything from Cypress and, low and behold, I couldn't get the LED to flash. Nothing I tried seemed to work so I uninstalled it and installed 4.2. Still, things didn't work, even when I followed the video.I finally got it but it's nothing like what I would have thought. I am using the CY8C6347BZI BLD53 device and the Red LED (actually named Red) is connected to Port 13 Pin 7 and the various macros are named likeCy_GPIO_Write(Red_0_PORT,Red_0_NUM,pinState);Here is the actual code in main_cm0p.c:Code:#include "project.h"int main(void){__enable_irq(); /* Enable global interrupts. */int pinState = 0;for(;;){Cy_GPIO_Write(Red_0_PORT,Red_0_NUM,pinState);CyDelay(500);pinState = 1 - pinState;}}Something like pinState = ~pinState (and any variations of that theme) don't work. Putting ~pinState or ~Cy_GPIO_Read(Red_0_PORT,Red_0_NUM) in the Cy_GPIO_Write() function call don't work either.I haven't tried this with 4.4 because I'm lazy. My other machines are running 4.2 in any event.Of all the other dumb things, how come some of the functions are named Cy_ and some are Cy as in CyDelay but Cy_GPIO_Read().One thing I found when installing 4.4 is that it doesn't remember where it hid the PDL directory.When you program, make sure you try Debug->Select target and program -> cm0p device. I don't know that this is required and the Program button (to the left of the Bug button) works thereafter to build and program. There is a closing comment in the Output windowDevice 'PSoC 63 CY8C6347BZI-BLD53 (CM0p)' was successfully programmed at 03/26/2021 15:04:44... emphasis added.This works too:Code:#include "project.h"int main(void){__enable_irq(); /* Enable global interrupts. */for(;;){Cy_GPIO_Inv(Red_0_PORT,Red_0_NUM);CyDelay(500);}}This document is really interesting:https://www.cypress.com/file/507681/download

author: rstofer
author_rank: Super Contributor
timestamp: March 26, 2021, 10:50:21 pm
content: And when you set the properties for the output pin, uncheck HW connection and set Initial drive state High (1) and, of course, set the name to Red.BTW, you don't needCode:__enable_irq(); /* Enable global interrupts. */

author: rstofer
author_rank: Super Contributor
timestamp: March 28, 2021, 02:24:49 pm
content: So, I had the code above working in 4.2. I upgraded to 4.4 and it didn't work. So, I backed up to 4.2.Same code, same target, same everything but 4.4 doesn't work for me.

author: Alinik
author_rank: Contributor
timestamp: July 17, 2023, 12:36:44 pm
content: Hello,I am having the exact same problem with a PSOC6 BLE Pioneer Kit CY8CKIT-062-BLE using PSoC Creator 4.4.By any chance has anyone found a solution?If it helps, my installation configuration is as follows:Environment:PSoC Creator 4.4 (4.4.0.80)Culture: Italian (Italy)OS Version: Microsoft Windows NT 10.0.19045.0CLR Version: 4.0.30319.42000Installed CyInstaller Products:Peripheral Driver Library 3.1.3Peripheral Driver Library 3.1.6PSoC Programmer 3.29.5PSoC Creator 4.4Thanks

author: Alinik
author_rank: Contributor
timestamp: July 20, 2023, 06:49:20 am
content: Hello,I try the same thing using PSoC Creator 4.2 but it doesn't work too.

author: Alinik
author_rank: Contributor
timestamp: July 24, 2023, 08:08:21 am
content: Hello,I solved the problem by installing PDL version 3.0.1 and building the firmware like this.To select which version of PDL to use for building you can go to PSoC Creator->Tools->Options... and from there in Project Managment select the right folder (i.e. 3.0.1) in PDL v3 (PSoC 6 devices) location.From the attached table you can see which PDL version you need based on the revision version of your kit.From this link you can download the various versions of the PDL:https://www.infineon.com/cms/en/design-support/software/software-archive/peripheral-driver-library-pdl-archive/#!designsupport