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.

AM3352: Read error with SPI1

Part Number: AM3352

Hello,

My customer working on a custom board based on the AM3352.

The custom board is connected security module using SPI1.

H17 -> SPI1_DIN

H16 -> SPI1_SCLK

J16 -> SPI1_DOUT

H18 -> SPI1_CS0

Below is SPI1 configuration.

spi1_pins_default: spi1_pins_default {
pinctrl-single,pins = <
AM33XX_IOPAD(0x908, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* (H16) spi1_sclk.spi0_sclk */
AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE2) /* (H17) spi1_d0.spi0_d0 */
AM33XX_IOPAD(0x910, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* (J15) spi1_d1.spi0_d1 */
AM33XX_IOPAD(0x444, PIN_INPUT_PULLUP | MUX_MODE2) /* (H18) spi1_cs0.spi0_cs0 */
>;
};

&spi1 {
pinctrl-name = "defualt";
pinctrl-0 = <&spi1_pins_default>;
status = "okay";
ti,spi-num-cs = <1>;

spidev0: spidev@1 {
compativle = "linux, spidev";
reg = <0x0>;
spi-cpha;
spi-max-frequency = <5000000>;
};
};

When she execute the test application (spidev_test), RX is failed.

#spidev_test -s 500000 -H -v -d 10 -p "\xAA\x00\x05\xFC\xFF\x10\x00\x05\x16"

spi mode: 0x0
bits per word: 8
max speed: 5000000 Hz (5000 KHz)
TX | AA 00 05 FC FF 10 00 05 16 

RX | 00 00 00 00  00  00 00 00 00   (Read data aren't always '00')

What could be the issue?