Other Parts Discussed in Thread: TIDA-010056
Why in TIDA Example Trapezoidal code Pin 1.0 which used as A0 for Speed Measure is not initialized as ADC functionality in init_IO() function? I am giving definition of this function below. There isn't configuration of P1.0 to set as ADC A0 pin functionality.
void init_IO (void)
{
//Hall Sensor inputs
P3SEL0 &= ~(BIT0+BIT1+BIT2); //GPIO - Hall sensors
P3DIR &= ~(BIT0+BIT1+BIT2); //Inputs - Hall sensors
//PWM outputs
//GPIO-PWM
P6DIR |= (BIT0+BIT1+BIT2+BIT3+BIT4+BIT5); //OutputPWM
//Indications
P2SEL0 &= ~ (BIT6); //GPIO-LED3
P2DIR |= (BIT6); //Output-LED3
//Direction Control
P5SEL0 &= ~(BIT4); //GPIO - DIR
P5DIR &= ~(BIT4); //Input - DIR
//Enable Gate driver
P4SEL0 &= ~(BIT1); //GPIO - DIR
P4DIR |= (BIT1); //Input - DIR
//Fault input
P4SEL0 &= ~(BIT0); //GPIO - DIR
P4DIR &= ~(BIT0); //Input - DIR
//Enable edge interrupt for Hall sensor ports
// P3IES |= ((BIT0)+(BIT1)+(BIT2)); // change the hall interrupt to falling edge to detect both the edges
// P3IE |= (BIT0 | BIT1 | BIT2);
PM5CTL0 &= ~LOCKLPM5;
// P3IFG &= ~(BIT0| BIT1 | BIT2);
__bis_SR_register(GIE);
}