6 years ago.

Can NUCLEO-L432KC board use asynchronous serial communication?

Hello all, I am trying to use asynchronous serial.

1. Currently, I am using serial.putc() or serial.printf() functions to send data. However it is not possible to process other tasks until completion of the data-transmitting currently. As I know, when using asynchronous serial, the write function returns immediately after sending tx_buffer. And the MCU process process other tasks while UART hardware transmits the buffered data independently. Is it right?

2. I found in the below site that there exists a library for async serial.

https://os.mbed.com/teams/SiliconLabs/wiki/Using-the-mbed-asynchronous-APIs

However, when I use the demo program (https://os.mbed.com/teams/SiliconLabs/code/Serial-LowPower-Demo/file/tip/main.cpp/), I failed to compile it since DEVICE_SERIAL_ASYNCH is not defined.

#if DEVICE_SERIAL_ASYNCH
Serial test_connection(USBTX, USBRX);
#else
#error "Platform not compatible with Low Power APIs for Serial"
#endif

Ok, I think that checks whether my platform supports asynchronous serial or not, and it says NUCLEO-L432KC board is not supported. However, STM32L432KC, MCU in the board supports asynchronous serial as shown in the datasheet.

/media/uploads/Clark_Youngdong_Son/----_2018-04-30_--_4.17.13.png

Can anyone tell me how to use asynchronous serial?

Thank you in advance.

Be the first to answer this question.