STM32 SPI communication Master issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-01-17 5:33 AM - last edited on ‎2024-01-17 5:57 AM by Imen.D
Recently working with spi communication in stm32g070rb using stm32CubeIDE (HAL library).SPI master receive interrupt triggered continuosly when there is no interrupt.But same code wrote in SPI slave its works perfectly.I also put Pull down resistor.Please provide solution
Solved! Go to Solution.
- Labels:
-
SPI
-
STM32G0 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-01-17 5:46 AM
Please follow SPI examples in the CubeMX repository to understand how they function. Here is one of several:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-01-17 5:46 AM
Please follow SPI examples in the CubeMX repository to understand how they function. Here is one of several:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-01-17 9:18 PM
I already ssen this example so My main problem is if i configure SPI master Spi rx callback automatically triggered again and again. Slave devices that rx callback function works perfectly. I think if any master mode fault what reason master spi interrupt triggered unwantedly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-01-17 9:45 PM
i have also one doubt if any did not connect miso,mosi,sclk pins to slave devices. i just load the code to master device then i see interrupt rx callback or error occurs. pls provide solution
this code works properly in full duplex slave if i set full duplex master or half duplex master does not works
my clock configuration is perfectly set and also give interrupt priority why this only woks slave not master devices
int main(void)
{
HAL_Init();
SystemClock_Config();
HAL_SPI_Receive_IT(&hspi1,spi_data,1);
while (1)
{
}
}
void HAL_SPI_RxCpltCallback(SPI_HandleTypeDef *hspi)
{
HAL_SPI_Receive_IT(&hspi1,spi_data,1); // ready for new interrupt
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-01-18 6:14 AM
Please don't duplicate post. It creates more work for people here. Stick to one thread.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-01-18 9:47 PM
sorry for inconvinence and thank for your patience
