Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Questions on activating GPIO Pins

Featured Replies

Hi

I'm using an Orange Pi PC Plus with a LoRa HAT (Semtech SX1278) connected via GPIO. The tool which uses this HAT connects directly to the SX1278 chip on the HAT, no protocoll like SPI is needed.

I'm using it for several years on RaspberryPi's without problems. But with the latest ARMBIAN Image for the Orange Pi PC Plus

Armbian_23.11.1_Orangepipcplus_bookworm_current_6.1.63.img.xz I have issues in this constellation.

The tool can not contact the SX1278 via GPIO, said the tool developer. It seems like I have to activate the GPIO pins before.

I've tried to find information about that, but without success.

 

So I hope to find here more information and help.

 

I have to use these hardware PINs (these are the PIN descritions on teh Raspberry Pi):

MOSI     SPI0_MOSI / GPIO10 (PIN 19)
MISO     SPI0_MISO / GPIO9 (PIN 21)
SCK     SPI0_SCLK / GPIO11 (PIN 23)
NSS/Enable     SPI0_CE0_N / GPIO8 (PIN 24)
RST     GPIO6 (PIN 31)

 

Thanks in advance.

you need to develop your dtbo to support your addon devices.

 

from your description, your device needs a set of SPI pins, and a reset pin.

1574068610_.png.68c2465c4155018bef919af6f9385769.png

 

OPI PC plus already provides the pins you want.

 

MOSI     SPI0_MOSI / GPIO10 (PIN 19)
MISO     SPI0_MISO / GPIO9 (PIN 21)
SCK     SPI0_SCLK / GPIO11 (PIN 23)
NSS/Enable     SPI0_CE0_N / GPIO8 (PIN 24)

 

then, you need develop a dtbo for your device.

 

156 &spi0 {
157         status = "okay";
158 
159         YOUR_DEVICE@0 {
160                 compatible = "YOUR_DEVICE";
161                 reg = <0>;
162                 spi-max-frequency = <50000000>;
163         };
164 };

 

if your device use an userspace driver, that not need YOUR_DEVICE@0 node.

 

that all you need to do.

  • Author

Hi,

 

the device uses the PINs only, but not the spi protocol. It talks directly so the SX1278 via the PINs. This works in RaspberryPi standard images from scratch without any change (only disabling SPI).

I don't know what you mean with "dtbo". I'm not a developer, only a user. Can you please give me some hints?

 

Regards

Edited by dco333

Probably no dtbo will be needed.
 

Find the 5 pins in your orange pi, that would be contacted by the hat, and try to control them with the Python code here:

 

https://forum.armbian.com/topic/33800-orange-pi-zero-3-gpio/?do=findComment&comment=181191


if that lorahat software is open source, then change that source code to point to the correct pin addresses

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.