Set SWD pin configuration "Debug Select" setting at runtime?

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

cross mob
EtHa_3840976
Level 2
Level 2

I would like to be able to send a command to the psoc that will switch the SWD pins back from GPIO mode to SWD mode. I know there is a setting for this in the system tab but I do not see any obvious way to set this during runtime. Is it possible?

0 Likes
1 Solution

rzzh,

I am trying to create an HSSP programmer for the psoc4. The host processor on this specific board cannot easily reach the clock rate required to acquire the chip (even when driving the clock in kernel space). However, if the psoc has the SWD pins configured as SWD (instead of GPIO), it can acquire it without needing to reach strict timing requirements. My plan was to disable the GPIO functionality on the psoc and switch to SWD before attempting to flash.

Ethan

View solution in original post

0 Likes
3 Replies
RyanZhao
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Hi Ethan,

As I knew, HSIOM registers controls the connection of IOs. I haven't tried to set SWD pin in run time, not sure if this HSIOM operation is enough to make it work.

Take PSoC4200 as an example, its register map:  http://www.cypress.com/documentation/technical-reference-manuals/psoc-41004200-family-psoc-4-registe...

pastedImage_0.png

Thanks,

Ryan

0 Likes
RyanZhao
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Hi Ethan,

I just...have a question about this setting...

Why would you like to change it in run time? If changed successfully, when would you like to run it in debug mode?

You know, if it is entered debug mode, the chip will reset, and run the code from start again...

Thanks,

Ryan

0 Likes

rzzh,

I am trying to create an HSSP programmer for the psoc4. The host processor on this specific board cannot easily reach the clock rate required to acquire the chip (even when driving the clock in kernel space). However, if the psoc has the SWD pins configured as SWD (instead of GPIO), it can acquire it without needing to reach strict timing requirements. My plan was to disable the GPIO functionality on the psoc and switch to SWD before attempting to flash.

Ethan

0 Likes