EXAMPLE: S32k144 UART printf/scanf under FreeRTOS - S32DS
Application based on FreeRTOS S32DS example performs prinf/scanf functionality
in FreeRTOS. Application runs in two modes - standard run-time mode with two tasks
maintained by scheduler and command mode implementing basic memory monitor.
Application was tested with putty terminal (http://www.putty.org/).
Putty serial terminal settings: 115200 8N1, no HW control.
USAGE:
In run-time mode is green LED blinking and on terminal are shown task
counter values.
To enter into COMMAND MODE - press button (next to LED diode). LED light
switches to red and you can enter commands.
Available commands:
===================
F show free heap memory
A set memory address
V print value on address
M set address to main()
P previous mem page
N next mem page
? help
X Exit from command mode
Putty configuration:
Terminal output:
Hi Jiri,
Can you tell me how to config the project that I can use printf to print serial port.
I download your attached project and copy the console.c & console.h, also initialize the LPUART1 and then use printf function in my code, but cannot see serial port print log.
But use the download project you provided it works.
Please advice, thanks.
Hi Jiri,
Thanks for relly, I cannot upload attachment file in this thread, can you help on below issue:
Hi,
for some reason your link is not accessible for me. Did you create your thread in https://community.nxp.com/community/s32/s32ds community space?
Jiri
Hi,
what terminal you are using? In RealTerm - RealTerm: Serial/TCP Terminal - Browse /Realterm/2.0.0.70 at SourceForge.net
is input working okay.
Jiri
Hi,
I can also compile using your project and pringf output is ok.I copied your console.c and.h files into my project. After adding the reference path, you can compile.But printf can't output, the code card dies here.
Hi Jiri,
Thanks for providing this sample code. With some modification, now I can use printf on S32K118.
I put scanf() in a task, and I found the task have high percentage of run time loading. That's because the __read_console traps in the LPUART_DRV_GetReceiveStatus if there is no input data.
Thus, I add some delay in the while loop or use LPUART_DRV_ReceiveDataBlocking with portMax_DELAY, then the run time loading becomes normal. I was wondering if this a correct method. If so, I think this could be a reference for others.
Regards,
Jimmy
Hi, I use your console.h and console.c file in my project, but get that problem, How can i do this? thank you very much.
if I use another config, still have error,I don't know how to slove this erroe, Thank you!
i creat three task in this demo, but it doesn't work, seems all hold on, can you check it ?
Hi! I am learning and using NXP S32k148 board from scratch. I have to connect ESP32 Wi-Fi module to NXP board and simply trans receive "HELLO" message using UART. How to do that? Please help me out. I cannot see any recourse about this so need your help.