cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H743 SPI2 waiting affects other RTOS tasks

Joerg Wagner
Senior III
Posted on January 09, 2018 at 14:50

Hello, this concerns CubeH7 1.1.0.

Simple app with 2 FreeRTOS tasks:

task #1 sends data continously via Ethernet

task #2 calls   i.e.

int waiting_time=0x1000;

HAL_SPI_Receive(&hspi2,buf,10,waiting_time);

to receive 10 bytes or whatever.

Thers is no SPI client connected.

The first task is affected by the waiting time and waits as well, no RTOS behaviour anymore !

The delay depends on the waiting time.

This does not happen when using SPI3 (both are identical)

HAL_SPI_Receive(&hspi3,buf,10,waiting_time);

- Joerg -

1 ACCEPTED SOLUTION

Accepted Solutions
Joerg Wagner
Senior III
Posted on January 20, 2018 at 15:58

CubeMX 4.23.0 sets 200 MHz as a default for SPI1,2,3 and this is a trap for beginners.

There is no limit test like for STM32F7 series.

The APB1 bus has a maximum frequency of 100 MHz.

Solution: Set DIVQ1 = 8  (old =4)

View solution in original post

1 REPLY 1
Joerg Wagner
Senior III
Posted on January 20, 2018 at 15:58

CubeMX 4.23.0 sets 200 MHz as a default for SPI1,2,3 and this is a trap for beginners.

There is no limit test like for STM32F7 series.

The APB1 bus has a maximum frequency of 100 MHz.

Solution: Set DIVQ1 = 8  (old =4)