Skip to content

Pin Mapping on L4R5ZI #1636

Closed Answered by fpistm
PerennialNovice asked this question in Q&A
Jan 27, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hi @MasteringTheMess
There is no link between PIN_Ax and the ADCx peripheral and channel.
PIN_Ax means the pin is defined to be the analog pin number Ax in Arduino naming.

You use it like this for the NUCLEO_L4R5ZI:
analogRead(A0); or analogRead(PA3); or analogRead(0); or analogRead(D107);

then the core will search in the PinMap_ADC array of the PeripheralPins.c which peripheral have to be used

WEAK const PinMap PinMap_ADC[] = {
{PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5
{PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_AN…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@PerennialNovice
Comment options

Answer selected by PerennialNovice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants