ASeif
New Contributor
6 years agoNIOS II - UART scanf limitation
Hello everyone,
I use NIOS II to implement a program.
The program is loading 'In Place' [at EPCS16 memory].
The "scanf" function does not work properly if it wants to get more than 4-byte at once.
For example
...
unsigned char RX[8];
scanf("%c%c%c%c%c%c%c%c", &RX[0], &RX[1], &RX[2], &RX[3], &RX[4], &RX[5], &RX[6], &RX[7]);
...This code sometimes does not fill "RX" when I send 8-byte from PC terminal (yes! I trusted the terminal).
However if I reduce the input length to 4-byte at once the problem is vanished.
Do have any idea what is wrong?
Is there any suggestion?
Is that related to 'In Place' execution things?