I'd like to draw attention to subject PR (https://github.com/rogerclarkmelbourne/ ... 2/pull/184) which provides following USART improvements in the F1 library:
- Buffered interrupt-based TX: as most of you know F1 library is using a polling TX approach which has very slow performance (even worse than in the UNO platform), buffered interrupt-based TX significantly increase the TX performance
- Runtime level RX/TX dynamic buffer allocation: generally Arduino based libraries use a static buffer allocation approach, this implies allocating buffers for all devices even if they are not used; runtime level dynamic buffer allocation allows instead allocating buffer for the only devices effectively used and also allows users to easily change the buffers size as preferred
- Introduction of non-blocking TX: this feature, taken from the F4 USBSerial library, allow users to specify they don't need blocking TX; difference between blocking TX and non-blocking TX is like difference between TCP and UDP protocols: in the first case the system will engage to guarantee that the full message is sent, in the second case the system will send as much of the message as possible (this depends on the TX buffer size) and will discard the remaining part
- invite users to actively test the changes and provide feedbacks
- evaluate the forum members interest on the improvements proposed
Thanks in advance and best regards, E.
PS: just want also to highlight that this PR doesn't aim to remove any of the existing functionalities (like RX buffering) and that effort has been spent to guarantee backward compatibility