The SPI cannot pull down the CS (Chip Select) automatically via hardware.

    Currently, I have configured cs-gpios in the device tree and loaded the SPI in the main function. Why is D0 (representing CS) kept high in my experimental waveform, and SCLK (D2), MOSI (D4), and MISO (D6) also behave abnormally?

Parents
  • Typically, after configuring cs-gpios in the device tree, there is no need to bind the CS pin further in the main function. However, the experimental results show that the CS pin must be bound in the main function; otherwise, neither Bluetooth initialization nor SPI transmission will succeed. If cs-gpios is configured in the device tree and the CS pin is still bound in the main function, the experimental results indicate that the CS pin is not pulled high and low as specified. Moreover, the pin bound in the main function competes with the cs-gpios configured in the device tree for control of CS, which also fails to meet the requirement of the hardware automatically pulling down CS.

Reply
  • Typically, after configuring cs-gpios in the device tree, there is no need to bind the CS pin further in the main function. However, the experimental results show that the CS pin must be bound in the main function; otherwise, neither Bluetooth initialization nor SPI transmission will succeed. If cs-gpios is configured in the device tree and the CS pin is still bound in the main function, the experimental results indicate that the CS pin is not pulled high and low as specified. Moreover, the pin bound in the main function competes with the cs-gpios configured in the device tree for control of CS, which also fails to meet the requirement of the hardware automatically pulling down CS.

Children
No Data
Related