Programming PSoC4

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.
niprc_3742601
Level 4
Level 4
5 likes given First like received First like given

Hello,

I need help with understanding how to program a PSoC4 chip given our hardware design.

Right now I have a PSoC 4 L-Series Pioneer Kit (CY8CKIT-046).  To program it I use PSoC Creator by pushing the "Program" button and that does all the magic.  However my target hardware is a slat with a few standalone PSoC4 processors: a Linux (Yocto) board (SoM) is connected to one of the PSoC processors (master) via UART and Serial Wire Debug (SWD).  The rest of the processors (slaves) are connected to the master with SWD.  The configuration is captured in the attached image.

My question is: how can I program the master and the slave processors?  At this point I am completely clueless.  Where do I start? What should I be looking at?  How complex is this problem?  How much work needs to be done?

I am fresh new to PSoCs programming and embedded programming in general.  I really appreciate any help that I can get.

Also the hardware design is not set in stone just yet.  If there is anything that we can change to alleviate the problem then our HW engineer would consider it given his restrictions.

Thank you!

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Programming needs 5 signals:

VDD

GND

XRES

SDA

SCL

All these signals are provided by a Miniprog3 or a Kitprog. To program different chips on a board you just need to jumper the SDA and SCL lines for the chip to the programmer.

Bob

View solution in original post

7 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Programming needs 5 signals:

VDD

GND

XRES

SDA

SCL

All these signals are provided by a Miniprog3 or a Kitprog. To program different chips on a board you just need to jumper the SDA and SCL lines for the chip to the programmer.

Bob

Thank you very much for the reply!

Let's see if I understood you correctly.  So to program a PSoC chip I need to do these three steps:

1.     connect my workstation to the PSoC processor via SWD bus that consists of the five signals (wires):

VDD

GND

XRES

SDA

SCL

2.     build my PSoC4 code into a binary file (hex file)

3.     power on the system and just write the hex file to the SWD bus

In other words, if the system wired properly, all I need is to write my hex file to SWD bus?

Thanks for help!

Nikolay

0 Likes

Just for setting it quite right:

1.

connect my workstation to the PSoC programmer via USB and the programmer to the  PSoC target processor.

Bob

0 Likes

The board that is going to be connected to the target PSoC processor is a SoM with arch64 processor and running Linux Yocto.  Do you know if PSoC programmer can be installed on it.  And if not, what can I do in this case?

Thanks again!

Nikolay

0 Likes

For project development and debugging you will need Creatot 4.2 as IDE which you can download freely from Cypress. Will run only under Windows. Same applies to the programmer software. Way out is to separate programming and executing stages.

Bob

0 Likes

Hi Bob,

I'm working with Nickolay on the hardware side of the design and want to clarify a couple things.  As outlined in the attachment to Nickolay's original post, the current plan is to have several PSoC-4200L's on an embedded module in a master-slave configuration.  Due to density and I/O limitations, we can only bring enough signals off the board for a single SWD interface; jumpers are not an option.  Our idea is to port AN84858 (Host Sourced Serial Programming (HSSP)) to both the "master" PSoC and the Linux host.  The bootstrap sequence would be 1) develop/compile using Creator 4.2, 2) download the hex files to the Linux host, 3) Linux host programs the master PSoC using HSSP, 4a) Master PSoC programs the slaves, or 4b) Master PSoC re-configures the SWD pins to relay to a slave so the Linux host can program them.

Questions:

1. By SCL and SDA in your message, did you mean the SWD pins?

2. Any gotchas or tips with this rather complex configuration? 

Thanks

David

0 Likes

1. By SCL and SDA in your message, did you mean the SWD pins?

Yes, rather SWDIO and SWDCLK

There is a programmer based on a PSoC5 named Kitprog. The source is available, could save you a lot of time,

Bob

0 Likes