How to assign another GPIO for ADC on PSoC63

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

cross mob
GaryLim
Employee
Employee
10 questions asked First like received 10 replies posted

In the basic ADC example (clean example from New Application), how can I change the default GPIO from P10_0 as defined by VPLUS_CHANNEL_0 to another GPIO? 

#define VPLUS_CHANNEL_0 (P10_0)

When I tried to reassign the GPIO for example to P9_2, the error message below is shown.

-----------------------------------------------------------
HAL: ADC using HAL
-----------------------------------------------------------

ADC initialization failed. Error: 67240192

In the Device Configurator, there is no initialization of P10_0 for the ADC. Is this hard coded somewhere?

Thanks

Gary

0 Likes
1 Solution
Sidramesh_S
Moderator
Moderator
Moderator
250 sign-ins 100 replies posted 25 solutions authored

Hi @GaryLim ,

You should use analog pins rather than the GPIO pins. please try with Port10 pins i.e. from P10.0 to P10.7.

Thanks and regards,
Sidramesh

View solution in original post

0 Likes
1 Reply
Sidramesh_S
Moderator
Moderator
Moderator
250 sign-ins 100 replies posted 25 solutions authored

Hi @GaryLim ,

You should use analog pins rather than the GPIO pins. please try with Port10 pins i.e. from P10.0 to P10.7.

Thanks and regards,
Sidramesh

0 Likes