PIC32MZ UART Errata solution
Currently using a PIC32MZ2064DAR176 to send and receive some data to a ublox u201 modem.
Have figured out that the pic was sending malformed stop bits to the modem which was causing the auto-baud rate to not work correctly. In the errata for this chip, in section 2.18.1 it says that to use the UART in high speed mode I have to recalculate the BRG register value. I have done that and set the value but the stop bit is still shorter than the other bits that get sent to the modem, and the modem doesn't respond to it.
Attached is an image of a capture of the serial comms. You can see that the stop bit is shorter than the other one.
I was able to get the modem responding by setting the UART to have two stop bits instead of one, but this doesn't seem to work when getting the response back from the modem, it doesn't match what's on the wire.
Does anyone have any ideas on how to fix the errata on this chip and have a single stop bit for the UART. Am I doing my calculation wrong.
Using the formula BRG = ( PbClk / 16 * BaudRate ) - 1 to calculate it.