cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

New Contributor II

I was asked to display cpu pins drive mode for all the CPU pins.

Found only the " SetDriveMode(uint8 mode)"

Is there a GetDriveMode() function available as well?

if not, how can i do it?

0 Likes
Reply
1 Solution
Moderator
Moderator

Hello,

You can read the PRT_PC register corresponding to the particular port using the CY_GET_REG32(). The GPIO drive mode is stored in the  [23:0] of the 32 bit register. Three bits are used for each pin. Please have a look at the Registers TRM for more details.

Thanks,

Ekta

View solution in original post

0 Likes
Reply
1 Reply
Moderator
Moderator

Hello,

You can read the PRT_PC register corresponding to the particular port using the CY_GET_REG32(). The GPIO drive mode is stored in the  [23:0] of the 32 bit register. Three bits are used for each pin. Please have a look at the Registers TRM for more details.

Thanks,

Ekta

View solution in original post

0 Likes
Reply