I've been playing with the SAMD51 CI and it's variant files. Everything is going really smoothly with the pins programming and when using the Arduino IDE to code. However, I've got a question that I could not find the answer and would appreciate if someone could help me understand the problem.
When dealing with the varian.cpp, we have the PinDescription array that basically tells us what is the function assigned to each pin, like the code below.
Code: Select all
[...]some code here[...]
{ PORTA, 6, PIO_DIGITAL, PIN_ATTR_PWM_E, No_ADC_Channel, TC1_CH0, TC1_CH0, EXTERNAL_INT_6 },
{ PORTA, 15, PIO_TIMER_ALT, PIN_ATTR_PWM_F, No_ADC_Channel, TCC2_CH1, TC3_CH1, EXTERNAL_INT_2 },
[...]some code here[...]
{ NOT_A_PORT, 0, PIO_NOT_A_PIN, PIN_ATTR_NONE, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE },
[...]some code here[...]
{ PORTB, 2, PIO_ANALOG, (PIN_ATTR_ANALOG|PIN_ATTR_PWM_E), ADC_Channel14, TC6_CH0, TC6_CH0, EXTERNAL_INT_2 },
[...]some code here[...]
I know that _ALT, al least for the SERCOM, means the second column (of the two with SERCOM) in the datasheet. However I don't know a TIMER column.
Also, why would anyone use NOT_A_PORT instead of just leaving without this line?