2024-12-17 01:34 PM - edited 2024-12-19 01:07 PM
Hello,
I am not receiving SPI interrupt on the NUCLEO-G491, and I would like some support.
Here is the source code project.
https://github.com/katsumat/STM32CubeIDE/tree/main/workspace_1.16.1/SPI
Specifically, I would like to perform the following actions:
single line name
SPI connection.
Here is the waveform for SPI1
I have set a breakpoint here at /* USER CODE BEGIN 3 */, but it is not being hit.
I have set a breakpoint at SPI2_IRQHandler, but it is not being hit. Could you advise me on why the interrupt is not occurring?
Solved! Go to Solution.
2024-12-19 01:06 PM
Thank you very much!
Interrupts are now working, and communication has been successfully established.
2024-12-17 03:50 PM
You have your pins swapped. MISO (Serial Out) and MOSI (Serial In)
PA6 connects to PB15 and PA7 connects to PB14
2024-12-17 05:53 PM
PF1 is not connected to the CN7 header by default.
Must close SB24 and open SB25.
2024-12-18 03:28 PM
Thank you for your response!
I have set SPI1 as master and SPI2 as slave.
In this case, I believe I should connect PA6 to PB14 and PA7 to PB15.
Is this correct, or am I mistaken?
2024-12-18 03:41 PM - edited 2024-12-18 04:47 PM
Based on your photo of MOSI connected to MOSI, this is incorrect. For SPI communications, MOSI on the master is connected to MISO on the slave.
MOSI = master out (master drives), slave in (slave reads)
MISO = master in, slave out
Edit: the above is nonsense. MOSI should be connected to MOSI. I was clearly distracted writing this.
2024-12-18 04:02 PM
Hi TDK san.
Thanks!!
OK!
I need to move the resistor from SB25 to SB24 with solder...
2024-12-18 04:48 PM
Note that my previous reply about MOSI/MISO was incorrect. It has been fixed.
The reply about SB24/SB25 is correct.
2024-12-18 10:07 PM
Sorry, I had a brain fart. I've been working on multiple slave devices that are communicating in series due to small pin count with limited I/O's for CS. For that type of setup, it is MISO to MOSI between slave devices.
But for your setup, you had the connection correct. Sorry for the confusion.
2024-12-19 01:06 PM
Thank you very much!
Interrupts are now working, and communication has been successfully established.