cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

EtHa_3840976
New Contributor II

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
Reply
1 Solution
EtHa_3840976
New Contributor II

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
Reply
3 Replies
RyanZhao
Moderator
Moderator

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
Reply
RyanZhao
Moderator
Moderator

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
Reply
EtHa_3840976
New Contributor II

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
Reply