Content originally posted in LPCWare by fjrg76 on Thu Nov 03 15:03:54 MST 2011
Quote: fjrg76
Hi
The FreeRTOS example that came with LPCXpresso is working (almost) nice with two tasks, and semihosting for serial comms (before I build the RS232 level converter). One task keeps real time, whilst other one prints out the system time every one second. I can see the system time in the integrated console, however, it doesn't update each second, but two seconds (system ticks calibration is ok, one second is one second). I'm thinking that semihosting uses a buffer or so, and that could be the reason why the system time is not updating as expected.
And after all, I'll need the RS232 level converter for real applications, so I built it. But now LPC UART is not working (with Redlib=NONE, no more semihosting). I followed the UART's device driver that also comes with the LPCXpresso.
What I'm doing now is to forget (for a while) the RTOS and tasks and friends, so I can focus in making the UART to work.
Any help is welcome (examples,tips, etc).
Kind regards
Answering myself, my theory was correct. Red Code semihost library uses a kind of internal buffer that needs to be filled before the bytes leave out, that's way it updates every two seconds instead the one second programmed.
I've built the RS232 level converter, and I stopped using semishosting, so now I'm seeing how my system-time is updating every one second, as expected, in a PC serial terminal. Even, it was integrated into the kernel as a task (I first tried to make the UART to work with no kernel at all) and it's working great. I'm happy :)