-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overlay for MAX31856 #3915
Comments
If PhilE says so then he's probably correct. ;-) Although I can have a guess at what a suitable overlay might look like, I would prefer to have it tested before adding it to the kernel. Are you running 5.9 at the moment, or more importantly, are you prepared to upgrade so you can test whatever I come up with? |
I have a brand new current stable 5.4.51+ #1333 system that I'm testing the MAX6675 with. I can easily clone it and update to 5.9 for testing. I would intend to use it with a type K thermocouple. I'd be very pleased to work with you. |
Extend the maxtherm overlay with support for the MAX31856. The driver reads the thermocouple type from a property, which is much more civilised. See: raspberrypi#3915 Signed-off-by: Phil Elwell <[email protected]>
I've opened a Pull Request (#3916) with the modifications to the maxtherm overlay to support the MAX31856. You can download a build of the overlay here: https://drive.google.com/file/d/1YSHc3-WQAO4gZHKLbJ1GtHXPOL2RYDad/view?usp=sharing linux/arch/arm/boot/dts/overlays/README Line 1668 in 17a22a7
|
Cool! I have an Adafruit MAX31856 board on order, it should be here on Saturday. I'll let you know how it goes... |
Ok I have it connected with this in /boot/config.txt cat compatible cat thermocouple-type od -cx thermocouple-type I'm not sure where to look next. Just to let you know I connected one of my MAX6675 boards with BTW, I also copied the new README file to the overlays directory, so the help shows the new changes. How would you like to proceed? Is this the right venue for working on this? |
I installed a python library from read.py ./read.py So it looks like the hardware and connections are ok. |
More information: /boot/config.txt ls -l /sys/bus/iio/devices/ ./readall.py When I substitute the MAX31856 for the MAX31855 on spi0:0 (including connecting SDO) there is no file for the MAX31856 in /sys/bus/iio/devices/. Same results as shown above in /sys/bus/spi/. The MAX31856 works fine with a bit bang python driver as shown above. |
You clearly know what you're doing and have the device wired up correctly, so this is a software issue. You've shown that the overlay has been applied (which can be confirmed by looking at the output of
|
Hi Phil,
There is a clue here, response to your questions:
root@surfacemnt:~# uname -a
Linux surfacemnt 5.9.1+ #1355 Mon Oct 19 14:10:47 BST 2020 armv6l GNU/Linux
root@surfacemnt:~# dmesg | grep -i -E "(spi|max)"
[ 0.000091] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
[ 0.060374] pid_max: default: 32768 minimum: 301
[ 0.080648] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.106316] hw-breakpoint: maximum watchpoint size is 4 bytes.
[ 1.981617] workingset: timestamp_bits=14 max_order=17 bucket_order=3
root@surfacemnt:~# lsmod | grep max
maxim_thermocouple 16384 0
industrialio_triggered_buffer 16384 1 maxim_thermocouple
industrialio 73728 3 maxim_thermocouple,industrialio_triggered_buffer,kfifo_buf
root@surfacemnt:~# dmesg -C
root@surfacemnt:~# modprobe max31856
modprobe: FATAL: Module max31856 not found in directory /lib/modules/5.9.1+
root@surfacemnt:~# dmesg
root@surfacemnt:~# (nothing)
Why did modprobe fail?
I updated from kernel 5.4 to 5.9 with
BRANCH=next rpi-update
as directed
Attempting to locate the kernel module:
root@surfacemnt:~# updatedb
root@surfacemnt:~# locate max31856
/root/max31856
/root/max31856/max31856.py
/root/max31856/max31856.pyc
/root/max31856/read.py
/usr/local/src/MAX31856/Adafruit_Python_MAX31856/Adafruit_MAX31856/max31856.py
/usr/local/src/MAX31856/Adafruit_Python_MAX31856/env_py3/lib/python3.7/site-packages/Adafruit_MAX31856/__pycache__/max31856.cpython-37.pyc
/usr/local/src/MAX31856/Adafruit_Python_MAX31856/env_py3/lib/python3.7/site-packages/Adafruit_MAX31856/max31856.py
(The kernel module was not found)
Thanks!
Denny
|
The obvious explanation for those symptoms is that the modules haven't been built and/or installed properly. Is there anything in the indicated modules directory (/lib/modules/5.9.1+)? |
cd /lib/modules/5.9.1+ drwxr-xr-x 11 root root 4096 Oct 23 14:07 kernel find . -name max -print ./kernel/drivers/rtc/rtc-max6900.ko Checking the alias file: cat modules.alias | grep 31856 Checking the 31855 So it appears that the 31856 was not compiled into this kernel. |
Our standard defconfigs don't enable the MAX31856 driver, so it's not going to work using one of our builds. I can and will add the module to future builds, but the quickest way forward for you is to build your own kernel, adding CONFIG_MAX31856=m to the configuration. |
Hmmm... I haven't compiled a kernel in a long time. Since I have a work-around for my project with the bit-bang python driver, I think I'll wait for it to be included in the next update. If you would be so kind as to notify me when that is available, I'll be happy to test it. Thank you so much for your help. |
Enable support for MAX38156 temperature sensors. See: #3915 Signed-off-by: Phil Elwell <[email protected]>
Enable support for MAX31856 temperature sensors. See: #3915 Signed-off-by: Phil Elwell <[email protected]>
Of course. The commit is in rpi-5.9.y now, and I'd expect a push to the |
Extend the maxtherm overlay with support for the MAX31856. The driver reads the thermocouple type from a property, which is much more civilised. See: #3915 Signed-off-by: Phil Elwell <[email protected]>
Enable support for MAX31856 temperature sensors. See: #3915 Signed-off-by: Phil Elwell <[email protected]>
Extend the maxtherm overlay with support for the MAX31856. The driver reads the thermocouple type from a property, which is much more civilised. See: #3915 Signed-off-by: Phil Elwell <[email protected]>
Enable support for MAX31856 temperature sensors. See: #3915 Signed-off-by: Phil Elwell <[email protected]>
Extend the maxtherm overlay with support for the MAX31856. The driver reads the thermocouple type from a property, which is much more civilised. See: #3915 Signed-off-by: Phil Elwell <[email protected]>
I updated the kernel today and the max31856 seems to work fine. uname -a With /boot/config.txt cd /sys/bus/iio/devices/iio:device1 Calculated temperature rounded to 2 places: ls -l Questions: Once you figure out which order they ended up in /sys/bus/iio/devices/ are they guaranteed to show up in that order on every reboot? Edit: Thanks for all your help! |
Enable support for MAX31856 temperature sensors. See: #3915 Signed-off-by: Phil Elwell <[email protected]>
Extend the maxtherm overlay with support for the MAX31856. The driver reads the thermocouple type from a property, which is much more civilised. See: #3915 Signed-off-by: Phil Elwell <[email protected]>
Enable support for MAX31856 temperature sensors. See: #3915 Signed-off-by: Phil Elwell <[email protected]>
Extend the maxtherm overlay with support for the MAX31856. The driver reads the thermocouple type from a property, which is much more civilised. See: #3915 Signed-off-by: Phil Elwell <[email protected]>
Enable support for MAX31856 temperature sensors. See: #3915 Signed-off-by: Phil Elwell <[email protected]>
Enable support for MAX31856 temperature sensors. See: #3915 Signed-off-by: Phil Elwell <[email protected]>
Extend the maxtherm overlay with support for the MAX31856. The driver reads the thermocouple type from a property, which is much more civilised. See: #3915 Signed-off-by: Phil Elwell <[email protected]>
Enable support for MAX31856 temperature sensors. See: #3915 Signed-off-by: Phil Elwell <[email protected]>
Extend the maxtherm overlay with support for the MAX31856. The driver reads the thermocouple type from a property, which is much more civilised. See: #3915 Signed-off-by: Phil Elwell <[email protected]>
Enable support for MAX31856 temperature sensors. See: #3915 Signed-off-by: Phil Elwell <[email protected]>
Extend the maxtherm overlay with support for the MAX31856. The driver reads the thermocouple type from a property, which is much more civilised. See: #3915 Signed-off-by: Phil Elwell <[email protected]>
Enable support for MAX31856 temperature sensors. See: #3915 Signed-off-by: Phil Elwell <[email protected]>
Extend the maxtherm overlay with support for the MAX31856. The driver reads the thermocouple type from a property, which is much more civilised. See: #3915 Signed-off-by: Phil Elwell <[email protected]>
Enable support for MAX31856 temperature sensors. See: #3915 Signed-off-by: Phil Elwell <[email protected]>
Extend the maxtherm overlay with support for the MAX31856. The driver reads the thermocouple type from a property, which is much more civilised. See: #3915 Signed-off-by: Phil Elwell <[email protected]>
Enable support for MAX31856 temperature sensors. See: #3915 Signed-off-by: Phil Elwell <[email protected]>
Extend the maxtherm overlay with support for the MAX31856. The driver reads the thermocouple type from a property, which is much more civilised. See: #3915 Signed-off-by: Phil Elwell <[email protected]>
Enable support for MAX31856 temperature sensors. See: raspberrypi/linux#3915 Signed-off-by: Phil Elwell <[email protected]>
Extend the maxtherm overlay with support for the MAX31856. The driver reads the thermocouple type from a property, which is much more civilised. See: raspberrypi/linux#3915 Signed-off-by: Phil Elwell <[email protected]>
Enable support for MAX31856 temperature sensors. See: raspberrypi/linux#3915 Signed-off-by: Phil Elwell <[email protected]>
Extend the maxtherm overlay with support for the MAX31856. The driver reads the thermocouple type from a property, which is much more civilised. See: raspberrypi/linux#3915 Signed-off-by: Phil Elwell <[email protected]>
Enable support for MAX31856 temperature sensors. See: raspberrypi/linux#3915 Signed-off-by: Phil Elwell <[email protected]> Signed-off-by: Fang Yafen <[email protected]>
Extend the maxtherm overlay with support for the MAX31856. The driver reads the thermocouple type from a property, which is much more civilised. See: raspberrypi/linux#3915 Signed-off-by: Phil Elwell <[email protected]> Signed-off-by: Fang Yafen <[email protected]>
Enable support for MAX31856 temperature sensors. See: raspberrypi/linux#3915 Signed-off-by: Phil Elwell <[email protected]> Signed-off-by: Fang Yafen <[email protected]>
Extend the maxtherm overlay with support for the MAX31856. The driver reads the thermocouple type from a property, which is much more civilised. See: raspberrypi/linux#3915 Signed-off-by: Phil Elwell <[email protected]> Signed-off-by: Fang Yafen <[email protected]>
Enable support for MAX31856 temperature sensors. See: raspberrypi/linux#3915 Signed-off-by: Phil Elwell <[email protected]> Signed-off-by: Fang Yafen <[email protected]>
Extend the maxtherm overlay with support for the MAX31856. The driver reads the thermocouple type from a property, which is much more civilised. See: raspberrypi/linux#3915 Signed-off-by: Phil Elwell <[email protected]> Signed-off-by: Fang Yafen <[email protected]>
Enable support for MAX31856 temperature sensors. See: raspberrypi/linux#3915 Signed-off-by: Phil Elwell <[email protected]> Signed-off-by: Fang Yafen <[email protected]>
Extend the maxtherm overlay with support for the MAX31856. The driver reads the thermocouple type from a property, which is much more civilised. See: raspberrypi/linux#3915 Signed-off-by: Phil Elwell <[email protected]> Signed-off-by: Fang Yafen <[email protected]>
Enable support for MAX31856 temperature sensors. See: raspberrypi/linux#3915 Signed-off-by: Phil Elwell <[email protected]> Signed-off-by: Fang Yafen <[email protected]>
Extend the maxtherm overlay with support for the MAX31856. The driver reads the thermocouple type from a property, which is much more civilised. See: raspberrypi/linux#3915 Signed-off-by: Phil Elwell <[email protected]> Signed-off-by: Fang Yafen <[email protected]>
raspberrypi inclusion category: feature bugzilla: 50432 -------------------------------- Enable support for MAX31856 temperature sensors. See: raspberrypi/linux#3915 Signed-off-by: Phil Elwell <[email protected]> Signed-off-by: Fang Yafen <[email protected]> Signed-off-by: Zheng Zengkai <[email protected]>
raspberrypi inclusion category: feature bugzilla: 50432 -------------------------------- Extend the maxtherm overlay with support for the MAX31856. The driver reads the thermocouple type from a property, which is much more civilised. See: raspberrypi/linux#3915 Signed-off-by: Phil Elwell <[email protected]> Signed-off-by: Fang Yafen <[email protected]> Signed-off-by: Zheng Zengkai <[email protected]>
Enable support for MAX31856 temperature sensors. See: raspberrypi#3915 Signed-off-by: Phil Elwell <[email protected]>
Extend the maxtherm overlay with support for the MAX31856. The driver reads the thermocouple type from a property, which is much more civilised. See: raspberrypi#3915 Signed-off-by: Phil Elwell <[email protected]>
According to PhilE there is support for the MAX31856 in kernel 5.9 but no overlay yet. Ref:
https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=288967
I would like to request this to be created, I would test it if it were available. Thanks!
The text was updated successfully, but these errors were encountered: