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

cross mob
D_Sd_3235936
Level 4
Level 4
25 sign-ins 50 questions asked 25 replies posted

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
1 Solution
Ekta
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

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
1 Reply
Ekta
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

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

0 Likes