Update: It looks like that there is a problem with the transmit. I done the following to find out why I got unexpected data.
What I expect with the loop:
TX_RX_CHECK_COUNT[1] shall be equal to U0C0_TRBSRH_TBFLVL : When Debugging the software the counter and the TBFLVL are equal every time.
But when I run the software for few seconds "Realtime" the counter and the TBFLVL are not equal.
Update :2
Now I was able to trace the "U0C0_TRBSRH_TBFLVL" and that's what happens:
U0C0_TRBSRH_TBFLVL = 0 : TX_RX_CHECK_COUNT[1]=0
U0C0_TRBSRH_TBFLVL = 1 : TX_RX_CHECK_COUNT[1]=1
U0C0_TRBSRH_TBFLVL = 2 : TX_RX_CHECK_COUNT[1]=2
U0C0_TRBSRH_TBFLVL = 3 : TX_RX_CHECK_COUNT[1]=3
U0C0_TRBSRH_TBFLVL = 4 : TX_RX_CHECK_COUNT[1]=4
U0C0_TRBSRH_TBFLVL = 5 : TX_RX_CHECK_COUNT[1]=5
U0C0_TRBSRH_TBFLVL = 6 : TX_RX_CHECK_COUNT[1]=6
U0C0_TRBSRH_TBFLVL = 8 : TX_RX_CHECK_COUNT[1]=7
U0C0_TRBSRH_TBFLVL = A : TX_RX_CHECK_COUNT[1]=8
U0C0_TRBSRH_TBFLVL = E : TX_RX_CHECK_COUNT[1]=9
U0C0_TRBSRH_TBFLVL = 10 : TX_RX_CHECK_COUNT[1]=A
Question is why the TBFLVL is increasing when I did not write on it?
Did anyone got maybe a similar error/problem?
Code:
while (U0C0_TRBSRH_TBFLVL < 15)
{
U0C0_IN00=RS_OUT[index_out++];
TX_RX_CHECK_COUNT[1]++;
}
TX_RX_CHECK_BUFF_LVL[1]=U0C0_TRBSRH_TBFLVL;
TX_RX_CHECK_COUNT[1] shall be equal to U0C0_TRBSRH_TBFLVL : When Debugging the software the counter and the TBFLVL are equal every time.
But when I run the software for few seconds "Realtime" the counter and the TBFLVL are not equal.
Update :2
Now I was able to trace the "U0C0_TRBSRH_TBFLVL" and that's what happens:
U0C0_TRBSRH_TBFLVL = 0 : TX_RX_CHECK_COUNT[1]=0
U0C0_TRBSRH_TBFLVL = 1 : TX_RX_CHECK_COUNT[1]=1
U0C0_TRBSRH_TBFLVL = 2 : TX_RX_CHECK_COUNT[1]=2
U0C0_TRBSRH_TBFLVL = 3 : TX_RX_CHECK_COUNT[1]=3
U0C0_TRBSRH_TBFLVL = 4 : TX_RX_CHECK_COUNT[1]=4
U0C0_TRBSRH_TBFLVL = 5 : TX_RX_CHECK_COUNT[1]=5
U0C0_TRBSRH_TBFLVL = 6 : TX_RX_CHECK_COUNT[1]=6
U0C0_TRBSRH_TBFLVL = 8 : TX_RX_CHECK_COUNT[1]=7
U0C0_TRBSRH_TBFLVL = A : TX_RX_CHECK_COUNT[1]=8
U0C0_TRBSRH_TBFLVL = E : TX_RX_CHECK_COUNT[1]=9
U0C0_TRBSRH_TBFLVL = 10 : TX_RX_CHECK_COUNT[1]=A
Question is why the TBFLVL is increasing when I did not write on it?
Did anyone got maybe a similar error/problem?