View unanswered posts | View active topics It is currently 18 Dec 2017, 22:23

Reply to topic  [ 3 posts ] 
 Carambola 2 and SPI pins - internal use only? 
Author Message

Joined: 18 Nov 2013, 18:44
Posts: 54
I guess that SPI pins that are available on AR9331 are used for internal flash memory, right?

Is it possible to use same SPI pins to connect external devices? Or are they reserved for some internal function? Is there kernel support for SPI pins on AR9331?

Can I use CS (chip select) to use both internal memory and Real Time Clock over same SPI bus? Can I add additional SD card to same bus and use all three devices?

Here is schematics from Carambola 2 device which uses AR9331 SoC:
http://8devices.com/media/files/8dev-07 ... sb_SCH.pdf

12 Jun 2014, 11:41

Joined: 21 Aug 2013, 21:21
Posts: 101
valent wrote:

Yes, onboard flash is on SPI bus, and SPI_CS 19 pin of C2 module (GPIO2/SPI_CS_0 B49 on AR9331) is the dedicated ChipSelect for it. You can use SPI bus pins for any other devices too, but You need a different ChipSelect pin! There are 2 additional hardware CS pin on AR9331: UART_RX 43 (GPIO9/UART_SIN/SPI_CS_1 B68) and UART_TX 44 (GPIO10/UART_SOUT/SPI_CS_2 A79) - GPIO / UART / SPI_CS function is muxed on these pins, You need to disable UART to reach another function. Or alternatively, You can use any other GPIO pin as ChipSelect - software CS gives a little bit higher cpuload and lower max speed, but its enough for most cases... But You need several modification in platform files!

RTC on SPI? It would be much easier to use an I2C based RTC like DS1307 on bitbanging I2C bus (kmod-i2c-gpio-custom)

Here it is a good article about MMC/SD card on hardware SPI bus:
(google translate is Your friend! ;))

16 Jun 2014, 07:18

Joined: 18 Nov 2013, 18:44
Posts: 54
I'm actually using i2c RTC Clock, but wrote it in a hurry as SPI, my brain wasn't working :)

I'm moving away from usb which is causing me lots of issues with bluetooth. I got HC-05 module which has serial, spi and i2c communication options. Which would you use? Serial is probably most straight forward, but requires lots of modifications on Carambola 2 to make it work, and then I loose serial for debugging.

Link you send for SPI is just what I was looking for! Thanks.

19 Jun 2014, 14:09
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.