Page 1 of 1

Luckfox Pico Mini B - can't open i2c-3 port from luckfox-config

Posted: 2025-02-08 4:09
by cronocr
Hello everyone! In Luckfox Pico Mini B, I2C port 3 should be open according to the documentation:

https://wiki.luckfox.com/Luckfox-Pico/L ... -Pico-I2C/

But it is not. I tried to enable I2C using luckfox-config from ADB according to this documentation:

https://wiki.luckfox.com/Luckfox-Pico/L ... ox-config/

I enter I2C menu, select [1] enable, enter speed [100000], but then I get this error:

Code: Select all

Could not find I2C_M_SDA
Please help me enable i2c-3. Thanks in advance!

Re: Luckfox Pico Mini B - can't open i2c-3 port from luckfox-config

Posted: 2025-02-08 6:26
by Ryand
Hello, can you check if there are any pin reuse conflicts? May I ask if you are using Ubuntu or buildroot system?

Re: Luckfox Pico Mini B - can't open i2c-3 port from luckfox-config

Posted: 2025-02-08 16:49
by cronocr
Thank you Ryand,

I'm using buildroot:

Code: Select all

[root@luckfox ]# cat /etc/os-release
NAME=Buildroot
VERSION=-g6a7f87806-dirty
ID=buildroot
VERSION_ID=2023.02.6
PRETTY_NAME="Buildroot 2023.02.6"
I'm not sure how to check for pin conflicts, but PWM pins are disabled:

Code: Select all

[root@luckfox ]# luckfox-config show
/usr/bin/luckfox-config: line 46: warning: command substitution: ignored null byte in input
                                Luckfox_Pico_MiniA/B
                                     + -USB- +
          -               -     VBUS |       | 1V8      -             -
          -               -      GND |       | GND      -             -
          -               -      3V3 |       | GPIO4_C1 - SARADC_M1   -
          - FIQtty_TX     - GPIO1_B2 |       | GPIO4_C0 - SARADC_M0   -
          - FIQtty_RX     - GPIO1_B3 |       | GPIO0_A4 -             - PWM1_M0
 PWM2_M2  - SPI0_M0_CS0   - GPIO1_C0 |       | GPIO1_C7 -             - PWM11_M1
 PWM4_M2  - SPI0_M0_CLK   - GPIO1_C1 |       | GPIO1_C6 -             - PWM10_M1
 PWM5_M2  - SPI0_M0_MOSI  - GPIO1_C2 |       | GPIO1_D3 -             - PWM11_M2
 PWM6_M2  - SPI0_M0_MISO  - GPIO1_C3 |       | GPIO1_D2 -             - PWM0_M1
 PWM8_M1  - UART4_M1_RX   - GPIO1_C4 |       | GPIO1_D1 - UART3_M1_RX - PWM10_M2
 PWM9_M1  - UART4_M1_TX   - GPIO1_C5 |       | GPIO1_D0 - UART3_M1_TX - PWM3_M2
                                     + - + - +
Forgot to mention that right after entering I2C menu I get this message: "No I2C Pins".

Re: Luckfox Pico Mini B - can't open i2c-3 port from luckfox-config

Posted: 2025-02-10 3:59
by Ryand
You need to obtain the latest SDK, the link is as follows: https://github.com/LuckfoxTECH/luckfox-pico. Previously, the mini board did not enable i2C3, but the latest one has

Re: Luckfox Pico Mini B - can't open i2c-3 port from luckfox-config

Posted: 2025-02-15 16:23
by cronocr
Thank you, that worked!

Another question, I'm trying to connect an I2C device that is master, is there are way to set Pico Mini buildroot as slave? When I send I2C data from the attached device the address isn't found, meaning Pico Mini should define its slave address first. But I couldn't find a way to set the slave address in the sample program:

https://drive.google.com/drive/folders/ ... drive_link

Re: Luckfox Pico Mini B - can't open i2c-3 port from luckfox-config

Posted: 2025-02-17 6:19
by Ryand
The i2c controller of rv1106 does not support slave mode. To implement it, only gpio can simulate i2c, and the driver may need to be modified. If there are no special requirements, it is recommended to use SPI. The SPI controller of rv1106 supports both master and slave modes.
企业微信截图_17397728348531.png

Re: Luckfox Pico Mini B - can't open i2c-3 port from luckfox-config

Posted: 2025-02-25 3:26
by cronocr
I want to detect I2C pins level changes, could you please provide an example or direct me to documentation for the RV1103 with Buildroot on how to set GPIO interrupts?

Re: Luckfox Pico Mini B - can't open i2c-3 port from luckfox-config

Posted: 2025-02-27 3:23
by Crocodile
Hello, to test the I2C pin level changes, you can use the command set from i2c-tools to assist with testing. For related I2C documentation, please refer to https://wiki.luckfox.com/zh/Luckfox-Pic ... x-Pico-I2C. We do not have examples or documentation for detecting I2C pin level changes through GPIO interrupts. If needed, you can refer to relevant blogs and tutorials. Most Cortex-A platforms use a similar approach for controlling I2C at the application layer.