Pin multiplexing problem(SWD as GPIO)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
jali_3846906
Level 3
Level 3
10 replies posted 5 replies posted 10 questions asked

     When I use P6_6 and P6_7(swd) to control LED,and program MCU,I can't program mcu through swd again.How can i do something to fix it?

0 Likes
1 Solution
MeenakshiR_71
Employee
Employee
100 likes received 50 likes received 25 likes received

I think you are probably not clicking "Port Acquire" in PSoC Creator.

Essentially after you re-purpose the SWD lines as GPIO, you cannot directly use Kitprog2's SWD protocol to program the device. When you click "port acquire", Kitprog resets PSoC and acquires the device during the reset window when SWD lines are active.

pastedImage_0.pngpastedImage_1.png

Hope this helps. You do not have to erase from PSoC Programmer.

Regards,

Meenakshi Sundaram R

View solution in original post

6 Replies
ShipingW_81
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

Have you ever tried to set Debug select as SWD, and test the feature of programming singly without any connection to external peripherals like LEDs?

0 Likes

Thank you for your advice.

0 Likes
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I have seen similar situation with other MCU.

With that MCU, there was a short time after MCU leaves out Power On Reset and

configures I/O for specified setup.

So we could grasp the MCU by push and hold the reset button and start debugger.

When debugger starts to access the MCU, release the reset button.

I don't know if this trick works for PSoC, too, but I hope it's a worth trying.

moto

After use PSOC programmer to erase block.I can program mcu again through by Creator.

MeenakshiR_71
Employee
Employee
100 likes received 50 likes received 25 likes received

I think you are probably not clicking "Port Acquire" in PSoC Creator.

Essentially after you re-purpose the SWD lines as GPIO, you cannot directly use Kitprog2's SWD protocol to program the device. When you click "port acquire", Kitprog resets PSoC and acquires the device during the reset window when SWD lines are active.

pastedImage_0.pngpastedImage_1.png

Hope this helps. You do not have to erase from PSoC Programmer.

Regards,

Meenakshi Sundaram R

Great.Thank you so much.

0 Likes