How to use PSOC4200L USB port as GPIO

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

cross mob
NXTY_Inoue
Level 3
Level 3
Distributor - NEXTY (Japan)
5 likes given First like given First like received

I had a discussion in the thread below.

https://community.infineon.com/t5/PSoC-4/IO-Supply-Source-of-PSOC4200L/m-p/367171#M43233

 

I was able to use it as GPIO without clearing USBDEVv2_USBIO_CR1.IOMODE. However, when  USBDEVv2_CR1.REG_ENABLE=1, the internal regulator of VBUS became active and it could not be used as a 5V interface.

When the USB port is used as 5V or 3.3V GPIO output, I would like to check if the following configuration works fine.

- USBDEVv2_USBIO_CR1.IOMODE=1 (Default)

- USBDEVv2_CR1.REG_ENABLE=0 (Default)

Is the above configuration correct when using the USB port as GPIO?

 

Best regards,

Inoue

 

0 Likes
1 Solution
Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hi @NXTY_Inoue 

You have mentioned that you were able to use the USB pins as GPIO without setting the IOMODE bits in the USBDEVv2_USBIO_CR1 as 0. Can you please confirm this? 

It is essential to set the IOMODE bits to 0 in order to use the USB pins as GPIOs.

The internal regulator is used to provide 3.3V to the USB D+ and D- pins in case the device is being run at 5 V (VBUS =5V). In case the device is run at 3.3V itself the internal regulator is no longer required and can remain off. 

As per your question I can understand that you want to run the USB pins as GPIO but could you also confirm if you want to use the pins at 5V or 3.3V?

Best Regards
Ekta

 

View solution in original post

0 Likes
1 Reply
Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hi @NXTY_Inoue 

You have mentioned that you were able to use the USB pins as GPIO without setting the IOMODE bits in the USBDEVv2_USBIO_CR1 as 0. Can you please confirm this? 

It is essential to set the IOMODE bits to 0 in order to use the USB pins as GPIOs.

The internal regulator is used to provide 3.3V to the USB D+ and D- pins in case the device is being run at 5 V (VBUS =5V). In case the device is run at 3.3V itself the internal regulator is no longer required and can remain off. 

As per your question I can understand that you want to run the USB pins as GPIO but could you also confirm if you want to use the pins at 5V or 3.3V?

Best Regards
Ekta

 

0 Likes