This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
工具/软件:Linux
我有一 个带有定制 PCB 接口的 AM3358和 IC880a、请使用 SPI0。
使用代码: github.com/.../lora_gateway
1 μ A、 AM335x-EVM-SDK-src-06.00.00.00、内核:Linux-3.2.0、spi0工作模式、SPI PLL 可以锁定。 所以、我的器件正常。
2 μ s、、但使用 AM335x-EVM-SDK-src-02.00.00.00、AM335x-EVM-SDK-src-01.00.00.00、AM335x-EVM-SDK-src-03.00.00.00等。 内核版本:linux-4.1.x、linux-4.4.x、 spi0不能正常工作 、SPI PLL 不 能始终 锁定。
很难启动 packet_fwd 或 util_tx_test、因为我经常会"错误:无法启动集中器"
DEBUG_REG = 1且 DEBUG_HAL = 1 (LLA_GATEWAE/liboragw/library.cfg)
我可以看到初始化失败:
lgw_setup_sx125x:407: Note: SX125x #0 version register returned 0x00
lgw_setup_sx125x:415: Note: SX125x #0 clock output disabled
lgw_setup_sx125x:469: Note: SX125x #0 PLL start (attempt 1)
lgw_setup_sx125x:469: Note: SX125x #0 PLL start (attempt 2)
lgw_setup_sx125x:469: Note: SX125x #0 PLL start (attempt 3)
lgw_setup_sx125x:469: Note: SX125x #0 PLL start (attempt 4)
ERROR: FAIL TO LOCK PLL
有时还可以
lgw_setup_sx125x:407: Note: SX125x #0 version register returned 0x12 lgw_setup_sx125x:415: Note: SX125x #0 clock output disabled lgw_setup_sx125x:469: Note: SX125x #0 PLL start (attempt 1) lgw_setup_sx125x:469: Note: SX125x #0 PLL start (attempt 2) lgw_setup_sx125x:407: Note: SX125x #1 version register returned 0x21 lgw_setup_sx125x:412: Note: SX125x #1 clock output enabled lgw_setup_sx125x:469: Note: SX125x #1 PLL start (attempt 1) lgw_start:788: Note: calibration started (time: 2300 ms) lgw_start:809: Note: calibration finished (status = 191)
我的解决方案是降低 Lora_gateway/liboragw/loragw_spi.native.c 中的 SPI_speed
//#define SPI_SPEED 8000000 // default value, error version register and PLL lock //#define SPI_SPEED 5000000 // default value, error version register and PLL lock //#define SPI_SPEED 2000000 // default value, error version register and PLL lock //#define SPI_SPEED 1500000 // sometimes work, sometimes not //#define SPI_SPEED 1000000 // ok //#define SPI_SPEED 800000 // ok but with 50% "version register and PLL lock OK but Calibration failed" //#define SPI_SPEED 500000 // ok //#define SPI_SPEED 200000 // ok #define SPI_SPEED 100000 // ok