Jump to content

Cubietruck with SPI


georf

Recommended Posts

Hello,

I want to use a 595N serial shift IC with my cubietruck over SPI. I tested it with a raspberry pi and it worked. But I want to use the SPI ports of my cubietruck to read sensor data and process some output over the 595N.

 

But I didn't find a good documentation, how to enable SPI support on armbian with a cubietruck.

 

My system uname -a: Linux cubie-rostock 3.4.113-sun7i #16 SMP PREEMPT Wed Jan 24 19:20:59 CET 2018 armv7l GNU/Linux

I changed the [spi2_para] part in the fex file to this:

[spi2_para]
spi_used = 1
spi_cs_bitmap = 1
spi_cs0 = port:PC19<3><default><default><default>
spi_cs1 = port:PB13<2><default><default><default>
spi_sclk = port:PC20<3><default><default><default>
spi_mosi = port:PC21<3><default><default><default>
spi_miso = port:PC22<3><default><default><default>

I did the following:

  1. root@cubie-rostock ~ # bin2fex /boot/bin/cubietruck.bin fex
  2. vim fex
  3. root@cubie-rostock ~ # fex2bin fex /boot/bin/cubietruck.bin

After a reboot I don't see any changes. I didn't get new devices and with python I can not get a spidev connection.

 

Perhaps the output of dmesg is interesting:

[    1.057830] [spi-err] Get spi devices number failed
[    1.062532] [spi-err] register spi devices board info failed
[    1.066617] [spi-inf] sun7i_spi_probe: sun7i spi probe
[    1.071277] [spi-inf] sun7i_spi_probe: spi2 dma type: normal
[    1.074853] [spi-inf] bus num = 2, spi used = 1
[    1.079303] [spi-inf] sun7i_spi_probe: spi2 cs bitmap: 0x1
[    1.087866] [spi-inf] sun7i_spi_set_mclk: spi2 source = sdram_pll_p, src_clk = 432000000, mclk 86400000
[    1.093795] sun7i-spi sun7i-spi.2: master is unqueued, this is deprecated
[    1.102506] [spi-inf] sun7i_spi_probe: reuuimlla's SoC SPI Driver loaded for Bus SPI2 with 2 Slaves at most
[    1.111890] [spi-inf] sun7i_spi_probe: spi2 driver probe succeed, base f058a000, irq 44, dma_id_rx 26, dma_id_tx 26

I don't know if it is relevant. Can anyone help me to get SPI working?

Link to comment
Share on other sites

  • chwe changed the title to Cubietruck with SPI
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines