9 years ago.

Error Stating That RawSerial (or Serial) Don't Have A Write Method

I'm using both a Nucleo-L152RE and a Nucleo-F401E. When I try to use the asynchronous write method, the compiler states "Error: Class "mbed::RawSerial" has no member "write" in "main.cpp", Line: 72, Col: 12". Same error if I switch to Serial. How can I use the asynchronous write method?

TIA, Aram

Question relating to:

1 Answer

9 years ago.

You can't. It's not supported on anything other than the silicon labs boards.

Hi Andy, thanks for the the information. But shouldn't that be part of the Serial/RawSerial documentation?

I'm implementing an RS-485 half-duplex system, so my ultimate goal is to know when the last byte has been fully transmitted on the serial port. Is there a way to find this out on a Nucleo?

TIA, Aram

posted by Aram Perez 13 Nov 2015

The tx interrupt is your best bet for the end of transmission. A library like MODSERIAL will allow async transmit and receive using interrupts in the background.

And yes, the documentation should be a lot clearer, since they added the async functions this issue comes up all the time.

posted by Andy A 13 Nov 2015