Hi, DIalog,
I'm using a UART to communicate with peripheral device.
First the MCU sends a command via UART, and then waits for feedback from peripheral.
The feedback length is not fixed and the coming time is unknown (varies from 0.1 second to a few seconds).
The system watchdog is enalbled, that means I can't wait UART feedback for a long time.
How to organize the tasks, ISR, Queue?
Is there a sample code for this application?
Thanks
Device:
Hi jamesleo-konka,
我不think that there is an example code for what you would like to do exactly, perhaps you can have a look at the peripherals_demo which is a console like application and that could give you some guidance. Regarding not having a fixed value for the numer of characters that you are waiting from the UART, an idea would be to read the characters one by one and have a specific tag that would indicate the end of the command.
Thanks MT_dialog