9DoF Razor IMU Maximum Baud Rate

Hi,

I have 9DoF Razor IMU. When I use the UART module with 115200 baud, it works fine. However, when I increase the baud rate like 230400 baud, the communication fails. I looked samd21 datasheet, and I saw that this baud rate should work fine with SparkFun clock frequency, which is 48 MHz. Am I missing something? What might be the problem?

Thanks

The code inside the SAMD21 may not work at that baud rate.

Firstly thanks for the reply.

Do you mean SparkFun Board Definition? I’ve edited “SECOM.cpp” file located in "…\ArduinoData\packages\SparkFun\hardware\samd\1.7.4\cores\arduino". I’ve entered the values of “sercom->USART.BAUD.FRAC.FP” and “sercom->USART.BAUD.FRAC.BAUD” manually, but it didn’t work either.

Also, I’ve tried arithmetic mode, which is mentioned in the datasheet of SAMD21, by deleting the code for fractional mode and replacing it with the following code.

sercom->USART.CTRLA.reg = SERCOM_USART_CTRLA_MODE(1) | SERCOM_USART_CTRLA_DORD;

sercom->USART.BAUD.reg = 60500;

But that didn’t work either.

No, the actual firmware running inside the chip on the Razor.

I don’t have one to confirm, but the firmware may not support your baud rate. If that’s the case, the only way around that would be for you to write your own custom firmware that supports the higher baud rate.

Sorry, I couldn’t find the firmware that you mentioned. Where can I find it?

You can find the firmware that runs inside the board at the link below.

  • [https://github.com/sparkfun/9DOF_Razor_ ... r/Firmware](https://github.com/sparkfun/9DOF_Razor_IMU/tree/master/Firmware)