没有人回复我在nx的论坛,orin和orin nx使用同一个驱动,应该是驱动有一些问题,希望可以解决
Hi,
On Jetson platforms, we support using peripherals like CAN, SPI, I2C, UART… etc. for the user.
For CAN usage:
https://docs.nvidia.com/jetson/archives/r36.3/DeveloperGuide/HR/ControllerAreaNetworkCan.html
For the connection of peripheral on the devkit, please refer to expansion-headers guide and carrier board specification:
https://docs.nvidia.com/jetson/archives/r36.3/DeveloperGuide/HR/ConfiguringTheJetsonExpansionHeaders.html
For pin configuration, please refer to pinmux spreadsheet:
https://developer.nvidia.com/embedded/secure/jetson/agx_orin/jetson_agx_orin_pinmux_config_template.xlsm
By default, the configuration is used for the devkit. If you are using the custom carrier board, please configure it according to your custom board design.
There are also several examples which have been verified from us, please check
https://elinux.org/Jetson/L4T/peripheral/
Please share the full dmesg and device tree for us to check your status in detail.
Thanks!
您好,谢谢回复
spi@3230000{ /* SPI3 in 40 pin conn */
compatible = “nvidia,tegra186-spi-slave”;
/compatible = “nvidia,tegra234-spi-slave-cnt-mode”;/
spi-max-frequency = <50000000>;
status = “okay”;
spi@0 {
compatible = “tegra-spidev”;
reg = <0x0>;
spi-max-frequency = <50000000>;
controller-data {
nvidia,variable-length-transfer;
nvidia,enable-hw-based-cs;
nvidia,rx-clk-tap-delay = <0x10>;
nvidia,tx-clk-tap-delay = <0x0>;
};
};
};
spi1(master)连接spi3(slave)
spi slave接收数据,接收36个字节大小的spi帧,master一秒发送3000帧给spi slave,程序运行一段时间(可能一秒,可能好几秒)会有这个错误
[ 657.094094] spi_master spi2: cpu-xfer-err [status:05400144]
[ 657.099865] spi_master spi2: CMD[33f01827]: Sl M3 CS0 [HHHH] MSB MSb Rx Tx Pa 8b TRANS[00ff0000]:BSY I:255 B:0
[ 657.099865] FIFO[05400144]:RxF:10 TxE:64 Err[Er] RxSTA TxSTA[UE]DMA[00000000]: RxTr:0 TxTr:0 B:35
[ 657.120112] spi_master spi2: failed to transfer one message from queue
和speed没有太大关系,和一秒内接收多少帧有关系
[ 198.311584] spi_master spi1: transferred[0] != requested[36]
[ 198.311593] spi_master spi1: CMD[13f01827]: Sl M1 CS0 [HHHH] MSB MSb Rx Tx Pa 8b TRANS[00ff0000]:BSY I:255 B:0
FIFO[04c00144]:RxF:9 TxE:64 Err[Er] RxSTA TxSTA[UE]DMA[00000000]: RxTr:0 TxTr:0 B:35
[ 198.311605] spi_master spi1: cpu-xfer-err [status:04c00004]
[ 198.311607] spi_master spi1: CMD[13f01827]: Sl M1 CS0 [HHHH] MSB MSb Rx Tx Pa 8b TRANS[00ff0000]:BSY I:255 B:0
FIFO[04c00144]:RxF:9 TxE:64 Err[Er] RxSTA TxSTA[UE]DMA[00000000]: RxTr:0 TxTr:0 B:35
[ 198.311618] spi_master spi1: failed to transfer one message from queue
JetPack6.1会多一行报错
spi-dump.txt (6.8 KB)这是我的接收程序
spi-send.txt (7.4 KB)这是我的发送程序
spi@3230000{
compatible = "nvidia,tegra210-spi-slave";
status = "okay";
spi@0 {
compatible = "tegra-spidev";
reg = <0x0>;
spi-max-frequency = <50000000>;
controller-data {
nvidia,enable-hw-based-cs;
nvidia,rx-clk-tap-delay = <0x10>;
nvidia,tx-clk-tap-delay = <0x0>;
};
};
};
这是我在JetPack6.1的设备树
Your issue is on Orin NX or Orin?
If it’s on Orin NX, then please continue doing the update at your original topic.
Thanks
你好,是在Orin Nx发现的,原来的话题没有人回复我,而且我认为orin应该也存在这个问题,因为驱动是一样的
Please let me follow up on your original post since you are using Orin NX.
好的,谢谢
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.