6 years, 5 months ago.

Conflict between serial port and spi on stm32 nucleo L432 KC

Hi, recently acquired the ST432 core L432 KC card to make a relatively simple project, I must take data from a pair of sensors through the I2c port and adc, send the data via bluetooth that is connected to the serial port, and at the same time save them in an SD memory connected to the SPI port. the problem arises when choosing the ports, since initially I chose the USART1 and SPI1 to do the work, the program did not initialize the SD card at any time, I clarify that I am using the SDFileSystem library to access the SD, so I changed to the SPI3 port managing to take the data of the ADC send it through the serial port and save it in the sd, but when enabling the I2C 1 (since I can not use the I2C 3 to share pin with the SPI3) the problem of the initialization of the SD returns as it reads I2C, ADC data and sends them through the serial port but does not save them in the SD. Since I am new to the world of ARMs, I do not know if I am declaring something wrong or I am omitting something, if someone could help me it would be great, because I did not find much information about this card. and sorry, my english is not very good

1 Answer

6 years, 5 months ago.

Make sure you are not using pins PA_5, PA_6, PB_6 or PB_7 without removing the solder bridges on the back of the Nucleo L432KC board. For reasons of compatibility with Arduino Nano, pin PA_5 is connected with pin PB_7 and pin PA_6 is connected with pin PB_6, using the solder bridges SB16 and SB18, and therefore cannot be used independently out of the box.

Also see the user manual for the STM32 Nucleo-32 boards, document number UM1956 from ST's website.

Regards, Marcel

Accepted Answer

tanks Marcel, you're amazing. I couldn't read the datasheet of board in that time . But your answer was my salvation. In this time I have a problem to program on RTOS on Mbed. I need an application multitasking but I don't want change the whole program.

posted by Fanny Calle 09 Jul 2018