This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Issue in UART

Hi,

I have upgraded my TI RTOS, then the MWARE got upgraded from 2_00_01_23 to 2_10_01_38 and XDC from 03_30__03_47 to 3_30_05_60

after the upgrade, the following code is not working properly.

printf("\n\rPress 'b' \n\r");

ulnStartTick=Clock_getTicks();

do

{

ulnstatus = UARTUtils_deviceread(0,&ch,1);

if((ulnstatus == 1)&&((ch=='b')||(ch=='B')))

{

initiateparameter();

}

}while((Clock_getTicks()- ulnStartTick)<5000);

It has to wait for 5sec then should come out of loop, but after upgrade of TI RTOS it is not coming out of do while loop. Also  I have set the baud rate as 9600 in my code but in Teraterm display is coming for baud rate 115200.

 

Thanks

Apoorva

  • Hi Apoorva,
    Are you seeing an issue with the UARTUtils_deviceread? if so, is the function returning or getting stuck? Are you reading the right characters?
    If it's not a UART issue, could it not be getting out of the while loop because of this expression (Clock_getTicks()- ulnStartTick) is not evaluating to a value less than 5000. You can but a breakpoint at that line and observe what values are returned by Clock_getTicks. I'll need more details like these to understand the problem better.

    Thanks,
    Moses