UM6 SPI Bus Programming

Hello,
I have recently purchased a UM6-lt. I have been able to use it over the UART tty, but the overhead required to parse the packets seems like overkill. I was impressed with the documentation for the UART packet structure, but when it comes to the SPI bus protocol specifications I have found the documentation severly lacking. I understand that the latest firmware is able to communicate over SPI, but I have found no documentation anywhere on the internet or in the manual as how to implement SPI with the UM6. I have never used SPI before, so any help would be greatly appreciated.

Thanks,
Andrew

Hello, Andrew.

Unfortunately, we don’t have any information beyond what is on the product page and in the user’s manual. I suggest you try contacting CH Robotics directly. If you have any trouble getting support from them, please let us know.

- Ben

Ben,

Thank you for your prompt response. I have been communicating with the helpful staff at CH Robotics. They sent me the following link providing more explicit details for using the SPI bus: docs.google.com/spreadsheet/ccc … VJuMV84QUE

Given that the UM6 SPI mode is 0. I should be able to easily implement a library to communicate with the UM6 over SPI.

I’m glad to hear you were able to get the information you were looking for, and thank you for sharing what you found with us!

- Ben

Andrew,

I too have been trying to talk SPI with the UM6. The UM6 is responding to me, but the packets aren’t making sense.

Have you found robust settings to use? If so, can you comment on frequencies, polarities, phase settings, or slave select timing?

Thanks,
Jimmy

I also am having trouble with SPI.
See my post on the CHRobotics site.

chrobotics.com/forum/viewtop … =9&t=17608

Amos

Hello Andrew,

You write that the SPI mode is 0. From reading the manual at http://www.chrobotics.com/docs/UM6_datasheet.pdf and Wikipedia at http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus, my impression is that the SPI mode is 2.

Figure 1 (“SPI Bus Timing”) of the manual shows the clock being high when inactive, and data being read in when the clock transitions from high to low. That corresponds to CPOL=1 in the “Clock polarity and phase” section of the Wikipedia page, which would correspond to an SPI mode of 2.

Having said that, I have not been able to get SPI to work yet either. It appears that the CH Robotics forums have disappeared or are down at the moment, so I have not been able to find more info there.

I’ll try to get in touch with CH Robotics directly, but would appreciate if anyone who is successful posts more info here.

Regards,

Erland

Hello,

In case any of you don’t know this, CH Robotics released an updated datasheet for the UM6 about a month ago. It has some more information on SPI communication in section 10.2, so maybe that will help clear up some questions. The datasheet can be found on the Resources tab of the UM6 product page.

- Kevin