Go to advanced search

by ondrej1024
Wed Oct 14, 2020 3:35 pm
Forum: Device Tree
Topic: [SOLVED] MCP23008 expander on I2C-0
Replies: 15
Views: 869

Re: MCP23008 expander on I2C-0

YESSSS, you really solved this!

It is finally working with this DT overlay. Thanks a lot for your perseverence. This DT stuff is sooo mind boggling, it is really out of my reach. I hope I will never ever have to modify a DT overlay again. ;)
by ondrej1024
Wed Oct 14, 2020 1:16 pm
Forum: Device Tree
Topic: [SOLVED] MCP23008 expander on I2C-0
Replies: 15
Views: 869

Re: MCP23008 expander on I2C-0

Unfortunately this didn't work either. Still getting pins 0,1 configured as I2C-0.
by ondrej1024
Wed Oct 14, 2020 11:23 am
Forum: Device Tree
Topic: [SOLVED] MCP23008 expander on I2C-0
Replies: 15
Views: 869

Re: MCP23008 expander on I2C-0

I added also this fragment but I still get I2C-0 enabled on pins 0,1. Here is the complete overlay file: // Definitions for MCP23017 Gpio Extender from Microchip Semiconductor /dts-v1/; /plugin/; / { compatible = "brcm,bcm2835"; fragment@0 { target = <&i2c0>; __overlay__ { status = &qu...
by ondrej1024
Wed Oct 14, 2020 9:56 am
Forum: Device Tree
Topic: [SOLVED] MCP23008 expander on I2C-0
Replies: 15
Views: 869

Re: MCP23008 expander on I2C-0

Well this did the trick, almost . The thing is I have the I2C-0 bus on pins 28,29 which I enable with this overlay: dtoverlay=i2c0,pins_28_29 Now with the modified mcp23017 overlay I get also pins 0,1 muxed to its I2C-0 functions and the driver looks for the MCP23008 on these pins, where it doesn't ...
by ondrej1024
Tue Oct 13, 2020 5:09 pm
Forum: Device Tree
Topic: [SOLVED] MCP23008 expander on I2C-0
Replies: 15
Views: 869

Re: MCP23008 expander on I2C-0

OK, thanks. I will give that a try. Looks complicated, though.
by ondrej1024
Tue Oct 13, 2020 3:41 pm
Forum: Device Tree
Topic: [SOLVED] MCP23008 expander on I2C-0
Replies: 15
Views: 869

Re: MCP23008 expander on I2C-0

Mmmh, this is getting tricky. There are no messages in dmesg related to the mcp230xx driver. vcdbg shows that the overlay is loaded: 005333.188: brfs: File read: /mfs/sd/overlays/mcp23017-i2c0.dtbo 005342.653: Loaded overlay 'mcp23017-i2c0' 005342.670: dtparam: addr=0x20 005343.799: dtparam: mcp2300...
by ondrej1024
Tue Oct 13, 2020 2:51 pm
Forum: Device Tree
Topic: [SOLVED] MCP23008 expander on I2C-0
Replies: 15
Views: 869

Re: MCP23008 expander on I2C-0

Thanks for the comment. I tried now with these additional flags but I get the same warnings as before. However the dtbo file has now exactly the same size as the original one, which is what I expected. But still, no driver gets loaded. :roll:
by ondrej1024
Tue Oct 13, 2020 1:31 pm
Forum: Device Tree
Topic: [SOLVED] MCP23008 expander on I2C-0
Replies: 15
Views: 869

[SOLVED] MCP23008 expander on I2C-0

There is the mcp23017 DT overlay which supports the MCP23017 and MCP23008 GPIO expander on the I2C-1 bus. Now I have a CM3 with an MCP23008 on the I2C-0 bus. I am using kernel 5.4.69-v7+. So I modified the mcp23017-overlay.dts by replacing the 2 occurences of target = <&i2c1>; with target = <&am...
by ondrej1024
Fri May 29, 2020 9:08 am
Forum: Ubuntu
Topic: Issue with rpiboot and CM3+ on Ubuntu 20.04
Replies: 1
Views: 235

Issue with rpiboot and CM3+ on Ubuntu 20.04

Hi all, came across e very weird issue. I mounted a CM3+ 8GB on a CMIO board using rpiboot on Ubuntu 18.04. No I try to mount the same CM3+ using rpiboot on Ubuntu 20.04. But all I get is this: May 29 10:51:19 dekitpc-24 kernel: [ 7506.304070] usb 1-1: new high-speed USB device number 33 using xhci_...
by ondrej1024
Sun May 24, 2020 12:43 pm
Forum: Automation, sensing and robotics
Topic: Developing Linux SW for relay cards
Replies: 66
Views: 11875

Re: Developing Linux SW for relay cards

I'm glad you got everything running eventually. Another happy crelay user ;)
Have fun switching your relays.
by ondrej1024
Fri May 22, 2020 6:22 am
Forum: Automation, sensing and robotics
Topic: Developing Linux SW for relay cards
Replies: 66
Views: 11875

Re: Developing Linux SW for relay cards

You are modifying crelay.conf in the crelay source directory!!! But crelay is reading it from /etc/crelay.conf This is what the documentation says: Configuration When running in daemon mode. the parameters for crelay can be customized via the configuration file crelay.conf which should be placed in ...
by ondrej1024
Wed May 20, 2020 6:28 am
Forum: Automation, sensing and robotics
Topic: Developing Linux SW for relay cards
Replies: 66
Views: 11875

Re: Developing Linux SW for relay cards

Looks like we are missing something here. Please do things one step at a time: Reboot your RPi Run "raspi-gpio get" and post the output here Configure the GPIOs in crelay.conf as follows: [GPIO drv] num_relays = 2 # Number of GPIOs connected to relays (1 to 8) active_value = 1 # 1: active ...
by ondrej1024
Tue May 19, 2020 6:11 am
Forum: Automation, sensing and robotics
Topic: Developing Linux SW for relay cards
Replies: 66
Views: 11875

Re: Developing Linux SW for relay cards

Install the raspi-gpio command (with sudo apt install raspi-gpio) and run raspi-gpio get This will print all GPIOs and their current configuration. For crelay choose only GPIOs which have the default configuration (INPUT). Use the same GPIO numbers that raspi-gpio uses. Maybe start by configuring on...
by ondrej1024
Mon May 18, 2020 8:31 pm
Forum: Automation, sensing and robotics
Topic: Developing Linux SW for relay cards
Replies: 66
Views: 11875

Re: Developing Linux SW for relay cards

I think you are using the wrong pin numbers. For example the first pin you define in your config file is 0. As mentioned before, crelay uses the BCM pin numbers and according to the RPi GPIO pinout the BCM pin 0 (physical header pin 27) is a reserved pin for I2C communication. So I guess what you me...
by ondrej1024
Mon May 18, 2020 6:09 pm
Forum: Automation, sensing and robotics
Topic: Developing Linux SW for relay cards
Replies: 66
Views: 11875

Re: Developing Linux SW for relay cards

I will try to test this myself. Please post your crelay.conf here.
by ondrej1024
Mon May 18, 2020 5:40 pm
Forum: Automation, sensing and robotics
Topic: Developing Linux SW for relay cards
Replies: 66
Views: 11875

Re: Developing Linux SW for relay cards

You can try to execute manually the steps crelay executes to switch on an IO pin. This is an example for BCM pin 4:

Code: Select all

sudo -s 
cd /sys/class/gpio
echo 4 > export
echo out > gpio4/direction 
echo 1 > gpio4/value
Check if this throws an error as well.
by ondrej1024
Sun May 17, 2020 6:03 pm
Forum: Automation, sensing and robotics
Topic: Developing Linux SW for relay cards
Replies: 66
Views: 11875

Re: Developing Linux SW for relay cards

Did you start the crelay daemon with sudo? crelay uses BCM pin numbering in the config file.
by ondrej1024
Tue Dec 10, 2019 3:57 pm
Forum: Advanced users
Topic: Configure sc16is7xx chip on compute module
Replies: 21
Views: 15803

Re: Configure sc16is7xx chip on compute module

I am using the SC16IS740 single UART chip with sc16is7xx driver included in the Kernel 4.9.13+. The driver is loaded via default sc16is750-i2c DT overlay. I am able to transmit data successfully to a slave device but receiving the response data does not work. I can see the data on the RX pin of the ...
by ondrej1024
Fri Nov 22, 2019 2:09 pm
Forum: HATs and other add-ons
Topic: RPi Zero: shut off power to USB port
Replies: 2
Views: 383

Re: RPi Zero: shut off power to USB port

Mmm, I was expecting this answer and I don't like it :roll:
Thanks anyway.
by ondrej1024
Fri Nov 22, 2019 9:20 am
Forum: HATs and other add-ons
Topic: RPi Zero: shut off power to USB port
Replies: 2
Views: 383

RPi Zero: shut off power to USB port

Hi, couldn't find a more appropriate forum, so I am trying to ask here. Is there a possibility to shut off the power of the microUSB port of the RPi Zero? On the RPi3 this can be done with the following command: echo 0 > /sys/devices/platform/soc/3f980000.usb/buspower I tried the same on the RPi Zer...
by ondrej1024
Mon Jan 14, 2019 10:29 pm
Forum: Automation, sensing and robotics
Topic: Developing Linux SW for relay cards
Replies: 66
Views: 11875

Re: Developing Linux SW for relay cards

The new release 0.14 of crelay is out.

Multiple relay card support has been improved by adding the possibility to specify the serial number in the API request. Also the WebGUI was updated with a more modern look and feel.

https://github.com/ondrej1024/crelay/releases

Ondrej
by ondrej1024
Fri Oct 26, 2018 2:37 pm
Forum: Compute Module
Topic: Connecting official 7''" RPi display to custom board
Replies: 9
Views: 4622

Re: Connecting official 7''" RPi display to custom board

Just to let you know that I got the display and touch screen working. Turned out the display connector we mount on our board has the contacts which connect to the flat cable on the wrong side, so I had to use a different flat cable (with the contacts on the same side of the cable on both ends). Now ...
by ondrej1024
Thu Oct 25, 2018 1:13 pm
Forum: Compute Module
Topic: Connecting official 7''" RPi display to custom board
Replies: 9
Views: 4622

Re: Connecting official 7''" RPi display to custom board

The VPU will automatically adjust the pinmuxing based on the pins that it has been told the relevant I2C device is connected to. That is why by default none of 0/1, 28/29, 44/45 are defined as having the i2c alt function in dt-blob.bin. It knows which other pins can potentially be muxed to the same...
by ondrej1024
Thu Oct 25, 2018 7:08 am
Forum: Compute Module
Topic: Connecting official 7''" RPi display to custom board
Replies: 9
Views: 4622

Re: Connecting official 7''" RPi display to custom board

Up to you! I prefer to define them in pin section too, avoids the problem one tries to use a GPIO which is already in use. Now I have added this to the dt-blob: pin@p28 { function = "i2c0"; termination = "pull_up"; }; // I2C 0 SDA pin@p29 { function = "i2c0"; terminati...
by ondrej1024
Wed Oct 24, 2018 9:31 am
Forum: Compute Module
Topic: Connecting official 7''" RPi display to custom board
Replies: 9
Views: 4622

Re: Connecting official 7''" RPi display to custom board

Do you have a CMIO at hands for testing your dt-blob.bin? Sometimes easier as on custom board. I have the CMIO but not the 22W to 15W display adaptor. Might need to buy it. And: you're supplying 5V to the screen, right? Yes, I am ;) And: i2C pins are also defined in your blob? Do they need to be de...

Go to advanced search