Problems with SPI communication

Hello everyone!

We are building a Solo robot at our lab and I am having problems with the SPI communication between the MasterBoard and the uDriver.

I have a very simple setup, the MasterBoard connected to one uDriver and two motors. I have checked the cable connections and the encoder, everything seems ok.
https://drive.google.com/file/d/1hSIK6r6E4nwUYHDuDFvFAXagHiLTPMSR/view?usp=sharing

I was able to flash both the MasterBoard and the uDriver successfully.

I am attempting to run the C++ example (example.cpp) from the SDK.
Without communication with the PC, the LEDs in the MasterBoard blink red, as expected, and a zero command message is sent to the uDriver. When I run the example, the LEDs on the MasterBoard start blinking green, but there is no movement in any of the motors, and both indicative LEDs on the uDriver stay on (not blinking).

I used ‘make monitor’ to check the SPI packets, and I had to add a debug print for the wrong CRC case (line 342 - masterboard_main.c) to see the sensor packets. It seems like the uDriver is returning a packet with a wrong CRC. I have tested with another uDriver board and the behavior is the same.

This the output of make monitor (debug prints on):
https://drive.google.com/file/d/11bp0x4nSbUSam51TzJkYgkGigzREvDIx/view?usp=sharing

And the output of example only shows the motor errors increasing in every iteration.

Furthermore, I have checked the data in the SPI pins using a logic analyzer and the info printed by ‘make monitor’ is compatible.

Do you have an idea of what might be the problem? Any help is greatly appreciated.

Best regards,
Vivian.

Hello Vivian. I am having this same issue. Were you able to resolve this? How can I also resolve it

Hello, Adedayo Akinade, I am Leandro from University of Sao Paulo and I am working on this project. I am having some problems and we can try to work it out together, my e-mail is leandrotca@usp.br feel free to contact me.