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.
sshersh
Level 3
Level 3
First solution authored 10 replies posted 5 questions asked

Hello, 

 
I am trying to bring up a PSOC6 MCU with PN CY8C614AAZI-S2F44 on a custom PCB. To verify I can program the device correctly, I'm trying to blink an LED on the board controlled by a MOSFET, schematic is shown below (cntl pin is connected to a GPIO on the PSOC). 
 
sshersh_1-1667321568346.png

 

 

I can connect to the PSOC succesfully through Cypress Programmer. I can make the debug target and program the PSOC through ModusToolbox or the CLI without any errors. But nothing happens on any of the GPIOs. I also tried GPIOs that aren't connected to anything on the PCB and probed them with a scope just to be sure.
In the peripherals viewer in Modustoolbox, all of the GPIO registers are 0. 
 
When I program through JTAG, the program seems to get stuck in the file "startup_psoc6_02_cm4.S" and I get the message:  
Warn : target not halted
Info : target psoc6.cpu.cm4 was not halted when resume was requested
Info : dropped 'gdb' connection
 
When I program through SWD, the debugger also hangs up and I get: 
Error: Failed to read memory at 0x00040004
 
As for the code itself, I originally just had a single call to cyhal_gpio_toggle() copied from an example and then I replaced it with manual calls to cyhal_gpio_write(). I've attached the code and Makefile in the archive below.
 
Thanks, 

 

Sam Shersher
ATE Test Engineer at Ferric, Inc.

0 Likes
1 Solution
sshersh
Level 3
Level 3
First solution authored 10 replies posted 5 questions asked

Further update:

I changed one line in the OpenOCD config file (openocd.tcl) and I'm now able to program the debug the board consistently.  The change was:

psoc6 sflash_restrictions 1

psoc6 sflash_restrictions 0

I'll check that this fixed all the targets before resolving the issue. 

View solution in original post

0 Likes
2 Replies
sshersh
Level 3
Level 3
First solution authored 10 replies posted 5 questions asked

Update: 

I was able to program the board to blink once using the PDL library instead of the HAL library. However, now when trying to reprogram it I get the same errors as in this previous post. I'm not sure what these "failed to read memory address <addr>" errors mean. 

Best, 

Sam Shersher

0 Likes
sshersh
Level 3
Level 3
First solution authored 10 replies posted 5 questions asked

Further update:

I changed one line in the OpenOCD config file (openocd.tcl) and I'm now able to program the debug the board consistently.  The change was:

psoc6 sflash_restrictions 1

psoc6 sflash_restrictions 0

I'll check that this fixed all the targets before resolving the issue. 

0 Likes