Week #9 progress with SPI

This week was week number 9

Time’s flying now.
Some minor issues with SPI.
So the BBB has 2 SPIs, ones taken up by the HDMI virtual cape, so no worries there. (Although I’d love to add support such that when the HDMI cape is inhibited, I could use SPI1 as well.  But that’s for laters.
BB-BONE-BACONE dts uses the SPI0 pins for the 7 segment leds.
So basically the pins are in mode 7. But we need them in mode 0 because we’d like to use spidev ( we could of course bit bang using these GPIO pins, and then we won’t need to work around the dtbo issue)

Right now I am using the dts found here, courtesy of Carl Johnson. But that doesn’t have the rest of the bits required by Bacon board, so I am running into all sorts of errors for PWM, etc. ( who expect them to be loaded by default ). This isn’t that big an issue really. We can change the BACONE dts to reflect SPI mux for the requisite pins, but then that’ll break most of the examples because they need the 7 segment.

Apart from this issue, I had a minor issue with #define SPI_CLOCK_DIVx bits. These are basically used to determine the clock speed of SCLK in SPI. Arduino defaults to 4Mhz  which is one quarter of 16Mhz, the system clock freq. Now the dts I am using has a  spi-max-freq of 24000000 (24Mhz). Now I want to make this compatible with Arduino without losing out the advantage of having a higher SPI clock rate than the same.

So #define SPI_CLOCK_DIV4 which means 4Mhz in Arduino, would mean 6Mhz in Beaglebone Black.
So do I want to keep it compatible to the SPI examples already with people, or do I want to utilize the full potential of the Black ?..

That’s one more issue I was facing.

Apart from that I had some minor issues with the SPI ICs I was trying out with my Arduino, but that’s done for now.
Really need to pick up speed now. Quite some ground to clear before September 20th.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s