- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To reduce power in the PSoC4, there was sample code to change the SWD pins to GPIO Hi-Z when going into deep sleep and changing them back when waking up. I can't figure out how to do this in the PSoC 6.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can you please let us know the MPN (Manufacturing Part Number) of the device that you are using and also if you are using PSoC Creator or ModusToolbox to develop applications for PSoC 6? You can disable the Debug mode in the System tab in the Design Wide Resources file in PSoC Creator and Device Configurator in ModusToolbox.
To change the configuration of the SWD pins to GPIO through code you can use the PDL API - Cy_GPIO_SetHSIOM() with the en_hsiom_sel_t value to be HSIOM_SEL_GPIO and then change the drive mode to Analog High-Z using the API - Cy_GPIO_SetDrivemode()
You will still be able to reprogram the device when the SWD pins are changed to GPIO and only the Debug mode will be disabled.
Please refer to this Application Note for more details - PSoC 6 MCU Low-Power Modes and Power Reduction Techniques
Thanks and Regards,
Rakshith M B
Edit: Added information about HSIOM
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can you please let us know the MPN (Manufacturing Part Number) of the device that you are using and also if you are using PSoC Creator or ModusToolbox to develop applications for PSoC 6? You can disable the Debug mode in the System tab in the Design Wide Resources file in PSoC Creator and Device Configurator in ModusToolbox.
To change the configuration of the SWD pins to GPIO through code you can use the PDL API - Cy_GPIO_SetHSIOM() with the en_hsiom_sel_t value to be HSIOM_SEL_GPIO and then change the drive mode to Analog High-Z using the API - Cy_GPIO_SetDrivemode()
You will still be able to reprogram the device when the SWD pins are changed to GPIO and only the Debug mode will be disabled.
Please refer to this Application Note for more details - PSoC 6 MCU Low-Power Modes and Power Reduction Techniques
Thanks and Regards,
Rakshith M B
Edit: Added information about HSIOM
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Rakshith M B,
CY8C6336BZI-BLF03 with PSoC Creator 4.3.
I want the pins to be in debug mode by default in the System tab.
I want to change them to GPIO only during deep sleep.
I was trying to figure out how to do it with Cy_GPIO_SetHSIOM() and was hoping there were #defines for SWD_CLK and SWD_DATA. For this part, I guess I'll need to use GPIO_PRT6 and the appropriate pin number.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ScKi_1600301,
You can follow the code snippet provided in the PDL API Reference Manual -
Regards,
Rakshith
Rakshith M B