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/PROCESSOR-SDK-AM335X:Linux/PROCESSOR-SDK-AM335X

Guru**** 2029510 points
Other Parts Discussed in Thread: AM3358
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/583993/linux-processor-sdk-am335x-linux-processor-sdk-am335x

器件型号:PROCESSOR-SDK-AM335X
主题中讨论的其他器件:AM3358

工具/软件: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



  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好!

    这个问题似乎与硬件相关、这是由于对电力线或感应 SPI 线路的某些影响而引起的、但是如果 SPI 与旧版 SDK 和 Linux 内核3.x 一起高速工作时保持稳定、我建议在两种情况下比较所有 SPI 寄存器值-当 SPI 稳定时 当它无法稳定工作时。

    BR
    Tsvetolin Shulev