The function working fine with out the red color code, after add these code to the function it trapped on line 1285 of uart.c
I can't figure out how to fix that, did I made a mistake somewhere in the code? Thanks!
while(1)
{
while (UARTCharsAvail(UART3_BASE))
{
for(x=0; x<SIG_LEN; x++) {
UARTCharPut(UART4_BASE, sig[x]);
}
}
while (UARTCharsAvail(UART4_BASE))
{
rv[bitnum] = UARTCharGet(UART4_BASE);
if(bitnum >= 9)
{
bitnum = 0;}
else
{
bitnum ++;
}
if (bitnum == 8 )
{
realv[0]=(rv[3]-48)*10000+(rv[4]-48)*1000+(rv[5]-48)*100+(rv[6]-48)*10+(rv[7]-48);
UARTCharPut(UART3_BASE,realv[0]);
UARTCharPut(UART3_BASE,realv[1]);
UARTCharPut(UART3_BASE,realv[2]);
UARTprintf("%u00 PPM\n", realv[0]);
}
}
}