I can receive data using UARTCharsAvail(UART0_BASE) inside a project wich include other pheriferics.
note I can sent data througth the uart but the function UARTCharsAvail(UART0_BASE) is not working.
I have test the uart conection with the lab 12 of the tivaware workshop. *(it works great,)
this is part of the code
while (seguro==1) //This is the main loop of the program
{
if ( UARTCharsAvail(UART0_BASE)) UARTCharPut(UART0_BASE, UARTCharGet(UART0_BASE));
qeiPosition = QEIPositionGet(QEI0_BASE);
while(qeiPosition>100 & qeiPosition<10000 ){
qeiPosition = QEIPositionGet(QEI0_BASE);
qeiDirection = QEIDirectionGet(QEI0_BASE);
qeiVelocity=QEIVelocityGet(QEI0_BASE);
//UARTCharPut(UART0_BASE, '$');
//UARTCharPut(UART0_BASE, ',');
UART_OutUDec(qeiPosition);
UARTCharPut(UART0_BASE, ',');
if (qeiDirection<0) {UARTCharPut(UART0_BASE, '-');
}
//if (qeiDirection > 0) {UARTCharPut(UART0_BASE, '+');
//}
//UARTCharPut(UART0_BASE, ',');
UART_OutUDec(qeiVelocity);
//UARTCharPut(UART0_BASE, '@');
UARTCharPut(UART0_BASE, '\n');
UARTCharPut(UART0_BASE, '\r');
SysCtlDelay (1333333);//(Sec*100); // 1 msec=400periodos, mSec *100 = 0.1 sec
}//fin de while
//PWMOutputState(PWM0_BASE, PWM_OUT_1_BIT | PWM_OUT_0_BIT, false);
seguro=0;
}
}
includes other periferial.
I