Skip to main content
Joerg Wagner
Senior III
January 9, 2018
Solved

STM32H743 SPI2 waiting affects other RTOS tasks

  • January 9, 2018
  • 1 reply
  • 580 views
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 -

    This topic has been closed for replies.
    Best answer by Joerg Wagner
    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)

    1 reply

    Joerg Wagner
    Joerg WagnerAuthorBest answer
    Senior III
    January 20, 2018
    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)