vidal
Posts: 4
Joined: Fri May 15, 2015 1:01 pm

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Tue Jun 14, 2016 1:21 pm

Sorry for the unsufficient report, I have said that I was using debian but that was not clear enough, and lost among the contribution.
At best I get a message in the log :
[ 10.569376] i2c /dev entries driver
but nothing more. I have never been able to get any i2c device . I am using a debian image.
Thank-you for the hint I have passed it on to maintainers of the script I used to build the image; even if at the moment I have not changed anything, I have thought that I would like to be able to build a custom kernel (stretch) and as comparisons raspbian/debian do not strongly favour one solution against the other, I decided to choose this debian script to build my raspberry image. I will drop the solution here if it comes out.
Thanks for your work sorry again for the unclear report.

SunDontShine
Posts: 17
Joined: Sat Jun 20, 2015 5:10 am
Location: Arizona. United States

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Tue Jan 24, 2017 6:16 am

So what is the correct way now with the latest rasping jessie?

I tried editing my

Code: Select all

/boot/config.txt
file with "device_tree=" and it breaks after reboot

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1364
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Tue Jan 24, 2017 6:46 am

rpi-4.4 and later kernels will not work without Device Tree. Why do you want to disable it?

SunDontShine
Posts: 17
Joined: Sat Jun 20, 2015 5:10 am
Location: Arizona. United States

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Tue Jan 24, 2017 10:41 pm

Well I want to simply run I2C using wiring Pi.

Even after I enable I2C through raspi-config I get the prompt that started this posted after trying to enter "gpio load i2c" in the command line

User avatar
DougieLawson
Posts: 30171
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Wed Jan 25, 2017 12:41 am

You need to upgrade your version of WiringPi.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

SunDontShine
Posts: 17
Joined: Sat Jun 20, 2015 5:10 am
Location: Arizona. United States

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Thu Jan 26, 2017 2:43 am

Code: Select all

gpio version: 2.38
Copyright (c) 2012-2017 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

Raspberry Pi Details:
  Type: Pi 2, Revision: 01, Memory: 1024MB, Maker: Sony 
  * Device tree is enabled.
  *--> Raspberry Pi 2 Model B Rev 1.1
  * This Raspberry Pi supports user-level GPIO access.
Above is my latest version. Is the solution still, to edit the /boot/config.txt file then? My raspi will not boot if I do this

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1364
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Thu Jan 26, 2017 6:38 am

What is in your config.txt? You can omit any comments and blank lines, but include everything else.

SunDontShine
Posts: 17
Joined: Sat Jun 20, 2015 5:10 am
Location: Arizona. United States

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Thu Jan 26, 2017 8:50 pm

HelloPhilE, below is my /boot/config.txt file. I have not made any modifications to this file on this build

Code: Select all

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# NOOBS Auto-generated Settings:
hdmi_force_hotplug=1

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1364
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Thu Jan 26, 2017 8:58 pm

To enable i2c, uncomment the "dtparam=i2c_arm=on" line. For userspace access, which I think is what you want, make sure "i2c-dev" is in /etc/modules. Then reboot.

SunDontShine
Posts: 17
Joined: Sat Jun 20, 2015 5:10 am
Location: Arizona. United States

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Fri Jan 27, 2017 6:31 am

Yes I've tried that... and to be extra sure I formatted the raspi and installed the latest rasping "noobs" version on there with wiringPi

I enabled I2C the /boot/config.txt file is below

Code: Select all

# For more options and information see
# http://www.raspberrypi.org/documentation/configuration/config-txt.md
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# NOOBS Auto-generated Settings:
hdmi_force_hotplug=1
/etc/modules

Code: Select all

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

i2c-dev
And finally when I run

Code: Select all

gpio load i2c

i receive the error below which points me to this forum?

Code: Select all

gpio: Unable to load/unload modules as this Pi has the device tree enabled.
  You need to run the raspi-config program (as root) and select the
  modules (SPI or I2C) that you wish to load/unload there and reboot.
  There is more information here:
      https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=97314
What is the known solution for this problem?

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1364
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Fri Jan 27, 2017 6:54 am

Have you tried skipping the "gpio load i2c" command? With your configuration both modules should already be loaded.

SunDontShine
Posts: 17
Joined: Sat Jun 20, 2015 5:10 am
Location: Arizona. United States

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Sat Feb 04, 2017 2:50 am

yes. i've tried that. same thing. does not work!
Does anyone know what version of raspian previously worked with this wiringpi i2c?

User avatar
DougieLawson
Posts: 30171
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Sat Feb 04, 2017 7:22 am

What does an lsmod command show?
What does ls -la /dev/i2c* show?

Do you have an up to date version of the wiringPi gpio command?

Code: Select all

root@apollo ~ # gpio -v
gpio version: 2.32
Copyright (c) 2012-2015 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

Raspberry Pi Details:
  Type: Model B+, Revision: 02, Memory: 512MB, Maker: Sony
  * Device tree is enabled.
  * This Raspberry Pi supports user-level GPIO access.
    -> See the man-page for more details
    -> ie. export WIRINGPI_GPIOMEM=1
root@apollo ~ #
even my version is six point releases out of date. See http://wiringpi.com/download-and-install/
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

User avatar
DougieLawson
Posts: 30171
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Sat Feb 04, 2017 7:42 am

Read the results from running Gordon's code. It doesn't work on device tree enabled kernels.

Code: Select all

root@intrepid:/shared/Raspi/wiringPi # gpio load i2c
gpio: Unable to load/unload modules as this Pi has the device tree enabled.
  You need to run the raspi-config program (as root) and select the
  modules (SPI or I2C) that you wish to load/unload there and reboot.
  There is more information here:
      https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=97314
root@intrepid:/shared/Raspi/wiringPi #
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

SunDontShine
Posts: 17
Joined: Sat Jun 20, 2015 5:10 am
Location: Arizona. United States

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Tue Feb 07, 2017 6:41 pm

Yes,
That is the error I received before. So how do you disable device_tree?

EDIT: I previously tried editing /boot/config.txt with "device_tree=" to disable the device tree, as found in the instructions https://www.raspberrypi.org/documentati ... ce-tree.md raspi documentation website.

The result of this, was the Pi would not boot up! I could not see the screen

User avatar
DougieLawson
Posts: 30171
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Tue Feb 07, 2017 7:46 pm

SunDontShine wrote:Yes,
That is the error I received before. So how do you disable device_tree?
You can't, because your kernel won't boot without it.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

BobKruse
Posts: 7
Joined: Thu May 21, 2015 6:26 pm

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Tue Feb 07, 2017 8:44 pm

DougieLawson & SunDontShine,

Am I wrong, or stating the obvious? I think the error message
"gpio: Unable to load/unload modules as this Pi has the device tree enabled.
You need to run the raspi-config program (as root) and select the
modules (SPI or I2C) that you wish to load/unload there and reboot."

Really just needs the "dtparam=i2c_arm=on" and "dtparam=spi=on" lines un-commented in /boot/config.txt

Then the load command still won't run, but it will already be loaded.

best regards,
Bob

User avatar
DougieLawson
Posts: 30171
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Tue Feb 07, 2017 8:47 pm

It's a junk message from ancient history before the device tree stuff made it easy to get I²C running.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

nomercy515
Posts: 1
Joined: Thu Feb 23, 2017 4:00 pm

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Thu Feb 23, 2017 4:04 pm

HI everyone,
I'm trying to setup my RPI 3B with latest Jessie on it.
I've already tried making the changes suggested in this forum such as
the few additions to the config.txt and I've also just ran an apt-get update to make sure everything was fine. Now my I2C setup works, but I can't manage to modify the GPIO baudrate via the WiringPi Library (Function: gpio load i2c 1000). it would always bring me back to the Device tree page troubleshoot, but I've been through it with no success. Any ideas?

ols
Posts: 7
Joined: Sun Feb 12, 2017 9:53 am

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Wed Mar 29, 2017 3:12 pm

Hi,

I am trying to setup SPI on my Rpi 2, rev. 01.
I used raspi-config in sudo mode to enable SPI.
I rebooted, but I can't find spi device in /dev/
How I can to enable spi ?

Thank you

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1364
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Wed Mar 29, 2017 3:14 pm

What is in your config.txt? And are you using NOOBS?

ols
Posts: 7
Joined: Sun Feb 12, 2017 9:53 am

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Wed Mar 29, 2017 4:21 pm

My config.txt is:

Code: Select all

# For more options and information see
# http://rpf.io/configtxtreadme
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# uncomment one of the ovrelays if loading from EEPROM is not supported
#dtoverlay=4dpi-32
#dtoverlay=4dpi-35
#dtoverlay=24-hat
#dtoverlay=32-hat
#dtoverlay=35-hat

#uncomment to enable HAT EEPROM programming
#dtparam=i2c0

[pi3]
kernel=kernel7_hat.img
[pi2]
kernel=kernel7_hat.img
[pi1]
kernel=kernel_hat.img
[pi0]
kernel=kernel_hat.img
[all]

enable_uart=1
I did not use NOOBS

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1364
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Wed Mar 29, 2017 4:24 pm

You look like you are using a non-standard kernel. You'd be better off reporting the issue to its maintainers.

ols
Posts: 7
Joined: Sun Feb 12, 2017 9:53 am

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Wed Mar 29, 2017 4:54 pm

I am using Jessy lite from official site.
I have kernel version:
Linux raspberrypi 4.4.34-v7+ #1 SMP Thu Dec 29 11:16:26 UTC 2016 armv7l GNU/Linux

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1364
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

Wed Mar 29, 2017 5:11 pm

That doesn't look standard. Delete the references to kernel*_hat.img and try again.

Return to “Troubleshooting”

Who is online

Users browsing this forum: ab1jx, leemoore1966 and 62 guests