Switching from JTAG to SWD PSOC3

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.
n8mayes
Level 1
Level 1
First reply posted First question asked Welcome!

I am a little confused with how to switch a PSOC 3 device from the default 4-wire JTAG to the SWD interface for programming / debugging. 

From reading over  the psoc 3 device programming spec (https://www.cypress.com/file/44676/download) it makes me believe that I have to toggle the TCK and TMS pins in a specific pattern each time to go from JTAG -> SWD. It is my understanding that the NVL's would not change and the device would simply re-enter 4-wire JTAG after a hard reboot.

When I read over the PSOC 3 datasheet (CY8C34), it states that all I would need to do is update the DPS nonvolatile latches to be 10b. It seems that this would have to be done via another tool "cyhextool" and with the mini prog 3 only (my interpterion of reading the help files, makes me believe this is another way to accomplish this). 

Since PSoC creator generates the hex file needed to update my program, and unless I am missing something (or don't understand intel hex file format), couldn't I just edit the fields within PSoc Creator, have it generate the hex file and upload it via PSoC programmer with a miniprog3?

Thanks,

-n8

0 Likes
1 Solution
Gautami_12
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi @n8mayes,

Yes, you can use  3wire SWD  in the PSoC3 device . If you purchase a new PSoC3  device. While you program it for the first time, you might have to do it in JTAG mode. Later, you can change the debug select to SWD and program again and work on it. Please refer to the screenshot.

Gautami_12_0-1654495435238.png

 

Warm Regards,
Gautami J

View solution in original post

0 Likes
3 Replies
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi @n8mayes

Can you please let me know the programmer that you will be using? If you are using MiniProg3 and PSoC Creator as you mentioned, you can directly program the device.

Thanks and Regards,
Rakshith M B
0 Likes
n8mayes
Level 1
Level 1
First reply posted First question asked Welcome!

Hi Rakshith,

 

The programmer I am planning to use is the miniprog 3, but I have not purchased the psoc 3 devices since I was confused if I could get it out of 4-wire JTAG and into 3wire SWD (giving me an extra pin to use in my design). There is a design work around I could implement with port expanders, but would prefer not to use it if possible since I only need one extra pin.

 

Thanks,

-n8

0 Likes
Gautami_12
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi @n8mayes,

Yes, you can use  3wire SWD  in the PSoC3 device . If you purchase a new PSoC3  device. While you program it for the first time, you might have to do it in JTAG mode. Later, you can change the debug select to SWD and program again and work on it. Please refer to the screenshot.

Gautami_12_0-1654495435238.png

 

Warm Regards,
Gautami J

0 Likes