In this test you will send a string typed in the Serial Monitor of the Arduino IDE to the Nucleo board, and it will be printed in a terminal using semi hosting. You need to open a Serial Monitor using the Arduino IDE configuring a speed of 9600 baud and you should use also the semi hosting binary for the STM32 microcontroller for watching further information.įinally, if you want to test the interrupt mode in the SPI driver you need to use the SPISlvTxIrq.ino sketch. For testing the command APIs you need to use the SPISlvCmd.ino sketch.
You can test the SPI driver in a bidirectional way using the SPI_SendCmds API placed in test_spi.c file or using the different APIs for commands in that file.
You need to open a Serial Monitor using the Arduino IDE configuring a speed of 9600 baud for receiving this string. You can use the SPI2_SendHello API placed in test_spi.c file which sends the 'Hello World' string to the Arduino board, for testing with this API you need to use the SPISlvRx.ino sketch. You need to set TEST_SPI to 1 in the test.h file for enabling the code to test the SPI peripheral driver. Arm semihosting enable Test Test SPI Driverįor testing the SPI driver you need to use the Nucleo board, an Arduino UNO board and also a logic level converter due to the Nucleo board works with 3.3V PIN level and Arduino UNO board works with 5V PIN level.