2

I am totally new to Raspberry Pi. I am trying to simulate a sensor with raspberry pi where my -

Devices

Sensor:       ANALOG DVICES ADIS16227-CMLZ iSensor (ADIS1622x/PCBZ) 
Device:       Raspberry Pi 3 Model B v1.2 (Broadcom BCM2837|FBG)

Pin connection

Pin No        Specification
----------------------------
17            VDD
19            MOSI
20            GND
21            MISO
23            SCLK
24            CE0

Current output

spi mode: 0
bits per word: 8
max speed: 500000 Hz (500 KHz)

00 00 00 00 00 00 
00 00 00 00 00 00 
00 00 00 00 00 00 
00 00 00 00 00 00 
00 00 00 00 00 00 
00 00 00 00 00 00 
00 00

My SD card has broken and add new SD card with Raspbian as Linux raspberrypi 4.9.36-v7+ #1015 SMP Thu Jul 6 16:14:20 BST 2017 armv71 GNU/Linux.

Previous output (in old broken SD card)

spi mode: 0
bits per word: 8
max speed: 500000 Hz (500 KHz)

80 80 80 80 80 80 
40 00 00 00 00 95 
80 80 80 80 80 80 
80 80 80 80 80 80 
80 80 80 80 80 80 
90 A9 A0 88 A2 A9 
80 09

Troubleshoot

  1. Activated spi with sudo raspi-config and also with sudo nano /boot/config.txt and got

    dtparam=spi=on
    
  2. Got output for lsmod as

    Module            Size            Used by
    ...               ...             ...
    spidev            7373            0
    i2c_bcm2835       7167            0
    bcm2835_gpiomem   3940            0
    spi_bcm2835       7596            0
    i2c_dev           6913            0
    ...               ...             ...
    
  3. ls -l /dev/spi* shows

    crw-rw---- 1 root spi 153, 0 Jul 9 17:19 /dev/spidev0.0 
    crw-rw---- 1 root spi 153, 1 Jul 9 17:19 /dev/spidev0.1
    

Question

  1. So, How can I check my spi driver for linux whether it is working or not while my Broadcom BCM2837 and activated modules for bcm2835?
  • Why do you think a module designed for one chip will work on another? Fi this would work why would the foundation bother supporting two different versions? – Steve Robillard Jul 9 '17 at 21:33
  • Yeah .. I agree with you @Steve Robillard. I got same output as mentioned in Current output section before breaking the SD card. Then I followed a blog that suggested to update driver (could not remember everything) and I got output as mentioned in Previous output section. I did everything as before ... in these 2 case the only one changed thing is SD card nothing else !! I didn't gate any driver for bcm2837 yet !! ... could you suggest me anything that I am missing? – testuser Jul 9 '17 at 21:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.