STM32 blue pill, SPI mcu-mcu comunication
Hello everyone. I'm currently just learning and getting familiar with microcontrollers. For educational purposes, I would like to set up master-slave communication between two C8T6 boards. The master should send an array of values, which the slave receives and evaluates. If the array matches a predefined pattern, the slave sends a response—also an array of values. The master receives the array and, if it matches the expected pattern, changes the state of an LED. This process should repeat in a loop.
When I connect the power, only the LED turns on and nothing else happens. If I reset the slave (using the button on the board), the communication starts working and the LED begins blinking. I can also get the communication to work by resetting the master, but I usually have to press the reset button several times before it connects properly. The slave always connects correctly after a reset.
If someone could help me figure out what I'm doing wrong, I would really appreciate it. I've been struggling with this for almost a week...
The code is focused purely on SPI polling.
Thank you very much!
