Basic serial communications example doesn't work on Arm Cortex M7 FVP

Hi All. I’m trying to get this serial communications example from mbed (https://os.mbed.com/docs/mbed-os/v6.2/program-setup/serial-communication.html#additional-examples-reading-user-inputs - the “Echo back characters you type” example) running on an Arm FVP (FVP_MPS2_Cortex-M7 - the 11.10 version). This code runs as expected on a physical board (STM NUCLEO-F746ZG) but on the FVP, it hangs as soon as it tries to read from BufferedSerial.

Hi Grant,

have you checked if the FVP is actually an Mbed enabled board
https://os.mbed.com/platforms/

If it isn’t then it will never have been tested or ported to Mbed. If it hasn’t been ported, you can have a go at doing so yourself using this guide:
https://os.mbed.com/docs/mbed-os/v6.2/porting/index.html

Regards
Anna

Hi Anna,

Just to clarify, the FVP is an Arm Fixed Virtual Platform (or Fast Model) and according to this page https://os.mbed.com/docs/mbed-os/v6.2/debug-test/fast-models.html it is supported.

The problem specifically seems to be with the BufferedSerial class. If I change BufferedSerial to UnbufferedSerial in that example, and surround the pc.read() with an if (pc.readable()) { ... block, then it works on the FVP. The problem is I don’t believe using an UnbufferedSerial will work with the application I need to get working (from a little test I did, it looks like it drops bytes).

Regards
Grant

Hi Grant,

You are right, I can reproduce your problem. I think this have nothing to do with BufferedSerial/UnbufferedSerial drivers.
But related with fast model’s UART modelling. the UART model get overrun and not responding while send/received request to fast.
I assume UnbufferredSerial somehow fire less read/write requests , hence UART still in function , but BufferredSerial will overrun the UART immediately.

Internally we noticed this and raised a ticket regarding this issue https://jira.arm.com/browse/SDDKW-45559

1 Like