I'd like to use the UART on the BLE33 in a project.
The one mapped on the pins RX(P1.10) and TX(P1.03).
I'm connecting Arduino to a Bluetooth module (Microchip RN4678) which supports up to 1Mbit baud rates for the best transfer rates over the air.
I've successfully initialized the UART using the Serial1.begin() function.
Serial.begin() instead is reserved for the UART over the USB port.
Since Arduino 33 BLE is based on the Nina B306 module
(datasheet here: https://www.u-blox.com/sites/default/files/NINA-B3_DataSheet_(UBX-17052099).pdf)
I'm reading on page 15 that the UART in the module supports up to 1Mbit baud rate and it has a programmable baud rate generator so that both standard and non standard baud rates are supported.
Hardware flow control is possible but on Arduino it doesn't seem like the possibility has been given since no pins have been mapped to RTS and CTS functions.
My BT module supports 115200, 307200 and 1000000 baud rates.
I've successfully initizialized the UART in Arduino with the Serial1.begin(115200) function and it perfectly works if the BT module if set to 115200 as well. The datas that Arduino sends to the BT module perfectly arrive to my smartphone.
Things do not work if I try to set both the BT module and Arduino to 307200 and 1000000 baud rates. Bad characters are sent to the BT module.
Is this a software problem related to the Serial1.begin() function that maybe doesn't support for example 307200 as a valid input? Which are the supported inputs in this case?
I also wonder if in the Arduino Nano 33 BLE the UART is effectively hardware based or maybe they're using a software serial over standard GPIO pins and renamed sofwareserial to serial1.
I've tried to set the BT module to 307200 baud rate and send datas to a smartphone from a PC using TeraTerm and it works so it's not a problem with the BT module.
Could you help me?