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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-03-16 7:32 AM
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..
- Labels:
-
SPI
-
STM32Cube MCU Packages
-
STM32G0 Series
