cancel
Showing results for 
Search instead for 
Did you mean: 

I am using the STM32G0xx_LL_Driver on the Debian product based on DragonBoard820c. We have the Snapdragon 820 processor which I have used as master, and MCU from ST is the slave device. For SPI transaction I'm unable to toggle Chip Select pin.

YJain.1
Associate II

GPIO_InitStruct.Pin = SPI_NSS_Pin;

 GPIO_InitStruct.Mode = LL_GPIO_MODE_ALTERNATE;

 GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_LOW;

 GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL;

 GPIO_InitStruct.Pull = LL_GPIO_PULL_UP;

 GPIO_InitStruct.Alternate = LL_GPIO_AF_0;

 LL_GPIO_Init(SPI_NSS_GPIO_Port, &GPIO_InitStruct);GPIO_InitStruct.Pin = SPI_NSS_Pin;

 GPIO_InitStruct.Mode = LL_GPIO_MODE_ALTERNATE;

 GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_LOW;

 GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL;

 GPIO_InitStruct.Pull = LL_GPIO_PULL_UP;

 GPIO_InitStruct.Alternate = LL_GPIO_AF_0;

 LL_GPIO_Init(SPI_NSS_GPIO_Port, &GPIO_InitStruct);

For NSS only gpio is pull-up ,rest cases CLK , Data lines are pull down, is that why CS never transits to low state?

I have used spi driver in master side: /drivers/spi/spidev.c where devicetree is :

cs-gpios = <&msmgpio 2 0>;

        spidev@0 {

            compatible = "spidev";

            spi-max-frequency = <40000000>;

            reg = <0>;

            spi-cpol;

            spi-cpha;

        };

Any help is welcomed..

0 REPLIES 0