HAL ADC initialization

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

cross mob
raya_4824241
Level 1
Level 1
10 sign-ins 5 sign-ins First like received

Hi,

I'm using the CY8CKIT-062-WIFI_BT and I'm having a simple problem using the ADC basic Template Application in Modus Toolbox 2.2.

The Template example runs okay using the single channel with pin P10_0.  I'd like to use it with another pin that's available when using the TFT shield.  I tried using the Template and selecting pin P11_0 instead and I get an adc initialization error 67240448.

I'm a newbie and I can't figure out where in the documentation to find what this error number is.  I also can't figure out where to find which pins I can use with the ADC.  Is that specified in the HAL documentation somewhere?

Thanks,

Ralph

 

0 Likes
1 Solution
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi Ralph, 

PSoC 6 HAL currently restricts the mapping of any GPIO pins as input to the ADC. Only pins that have a direct connection to the ADC can be used as inputs to the ADC. On all the supported boards, P10_x are the preferred GPIO pins as the input for the ADC because they directly connect to the ADC. This is the reason the HAL init API fails when P11_0 is used. 

Thanks and Regards,
Rakshith M B

View solution in original post

2 Replies
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi Ralph, 

PSoC 6 HAL currently restricts the mapping of any GPIO pins as input to the ADC. Only pins that have a direct connection to the ADC can be used as inputs to the ADC. On all the supported boards, P10_x are the preferred GPIO pins as the input for the ADC because they directly connect to the ADC. This is the reason the HAL init API fails when P11_0 is used. 

Thanks and Regards,
Rakshith M B

Thanks Rakshith,

I found that I can get to P10_6 even with the shield installed, so I tried that and it works.

Ralph

0 Likes