I am using a luckfox pico ultra w with buildroot built using the luckfox-pico sdk.
I am having trouble activating spi and i2c just by placing a /etc/luckfox.cfg as follows:
SPI0_M0_CS_ENABLE=1
SPI0_M0_MODE=1
CSI_ENABLE=0
RGB_ENABLE=0
SPI0_M0_STATUS=1
SPI0_M0_MISO_ENABLE=1
SPI0_M0_SPEED=500000
UART3_M0_STATUS=1
UART4_M0_STATUS=1
I2C3_M0_STATUS=1
I2C3_M0_SPEED=1000000
No matter how many times i reboot my board spi and i2c wont activate.
The only way to activate them is to manually invoking luckfox-config and disabling csi and rgb and rebooting aftewards.
Installing this /etc/luckfox.cfg should not be enough?
Sometimes my /etc/luckfox.cfg just get rewritten with the default version:
SPI0_M0_CS_ENABLE=1
SPI0_M0_MODE=1
What could be happening? How do I solve this?
luckfox.cfg
It should be noted that the default port will be occupied by RGB, so you need to disable RGB first. To enable the relevant pins, use luckfox-config or modify the relevant device tree.
https://wiki.luckfox.com/Luckfox-Pico/L ... -Pico-GPIO
https://wiki.luckfox.com/Luckfox-Pico/L ... -Pico-GPIO
We are using luckfox-config config to disable the RGB and the CSI. The problem is that the configuration sometimes does not survive a reboot and the generated luckfox.cfg is overwritten.
Settings that need a reboot to take effect are made by directly modifying the dtb. The ENABLE status in luckfox.cfg is only for record. Simply modifying luckfox.cfg does not take effect during configuration loading.