• 0
peter64

Buffered UART TX with interrupts on uC32

Question

Posted (edited)

Hello, I was hoping to use your uC32 board to control 4 stepper motor drivers and to provide debug information over serial back to a PC.

Unfortunately though the UART routine implemented in HardwareSerial only has a buffered RX implementation and not a buffered TX implementation.

This means that at lower baud rates or with larger debug payloads the time to send the data into the serial line can take a rather long time.

I looked around online and I can't find any pre-built libraries that implement an IRQ based UART TX Buffer on the PIC32 that would be compatible with the framework supplied by chipkit. I found one but it's based on entirely different compiler and set of libraries so doesn't appear compatible.

http://phoenix-mindgame.blogspot.com/2014/09/pic32-uart-transmission-using-tx.html

The regular core arduino HardwareSerial library was updated at some point to support a TX buffer, would diligent consider updating the HardwareSerial implementation that comes with chipkit for the uC32 to also support a TX buffer?

UPDATE: I managed to implement a TX buffer without too much difficulty, not sure how robust it is though, this fixed my issue by eliminating blocking serial writes. This might be a useful feature improvement you would consider for the future.

Edited by peter64

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hi @peter64,

Glad to hear that you were able to implement a TX buffer to resolve the tx data rate issue. I have passed your suggestion on to our content team. 

best regards,

Jon

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now