cancel
Showing results for 
Search instead for 
Did you mean: 

SPI maximum clock frequency for STM32H5 MCUs devices when using PB13 and PB14 I/Os

Imen.D
ST Employee

Summary

This article includes SPI characteristics and clarification of maximum clock frequency when using PB13 and PB14. They are applicable for STM32H523xx, STM32H533xx, STM32H573, STM32H562xx, and STM32H563xx microcontrollers. The purpose of the article is to anticipate the updates that will occur soon in the “SPI characteristics” tables of the STM32H573xx, STM32H562xx and STM32H563xx datasheets (DS14258 Rev 2 and DS14121 Rev 2).

 

SPI interface characteristics

Unless otherwise specified, the parameters given in the SPI characteristic table are derived from tests performed under the ambient temperature. fPCLKx frequency, and VDD supply voltage conditions are summarized in the datasheet, with the following configuration:

  • Output speed is set to OSPEEDRy[1:0] = 11
  • Capacitive load CL = 30 pF
  • Measurement points are done at CMOS levels: 0.5 x VDD
  • I/O compensation cell activated
  • HSLV activated when VDD ≤ 2.7 V
  • VOS level set to VOS0

Refer to section “I/O port characteristics” in the STM32H5xx datasheet for more details on the input/output alternate function characteristics (NSS, SCK, MOSI, MISO for SPI).

Note: In the tables below, the terms "master" and "slave" have been replaced respectively by "controller" and "target". This is an intentional change to improve inclusive language, and will eventually be implemented in all documentation.

Table: SPI Characteristics for STM32H573xx, STM32H562xx and STM32H563xx microcontrollers (1*)

Symbol

Parameter

Conditions

Min

Typ

Max

Unit

 fSCK

1/tSCK

SPI clock frequency

Controller receiver mode

2.7 V <VDD< 3.6 V

-

-

135/3(2*)

 

 

 

 

 

MHz

 

 

 

 

 

Controller receiver mode

1.71 V <VDD< 2.7 V

-

-

120/3(2*)

Controller transmitter mode

2.7 V <VDD< 3.6 V

-

-

135/3(2*)

Controller transmitter mode

1.71 V <VDD< 3.6 V

-

-

120/3(2*)

Target receiver mode

1.71 V <VDD< 3.6 V

-

-

120

Target transmitter mode

2.7 V <VDD< 3.6 V

-

-

43/6(3*)

Target transmitter mode

1.71 V <VDD< 2.7 V

-

-

41/6(3*)

1*. Evaluated by characterization – not tested in production.
2*. When using PB13.
3*. When using PB14.

 

Table: SPI characteristics for STM32H523xx/STM32H533xx microcontrollers (1*)

Symbol

Parameter

Conditions

Min

Typ

Max

Unit

 fSCK

1/tSCK

SPI clock frequency

Controller receiver mode

2.7 V <VDD< 3.6 V

-

-

135/3(2*)

 

 

 

 

 MHz

 

 

 

 

 

 

Controller receiver mode

1.71 V <VDD< 2.7 V

-

-

120/3(2*)

Controller transmitter mode

2.7 V <VDD< 3.6 V

-

-

135/3(2*)

Controller transmitter mode

1.71 V <VDD< 2.7 V

-

-

120/3(2*)

Target receiver mode

1.71 V <VDD< 3.6 V

-

-

120

Target transmitter mode

2.7 V <VDD< 3.6 V

-

-

43(3*)/6(4*)

Target transmitter mode

1.71 V <VDD< 2.7 V

-

-

41.5(3*)/6(4*)

1*. Evaluated by characterization – not tested in production.
2*. When using PB13.
3*. The maximum frequency in target transmitter mode is determined by the sum of tv(SO) and tsu(MI), which must fit into the SCK low or high phase preceding the SCK sampling edge. This value can be achieved when the SPI communicates with a controller having tsu(MI) = 0 while Duty(SCK) = 50%.
4.* When using PB14.

 

Consider that PB13 and PB14 are special IOs for UCPD with limited speed (supporting Low speed output and medium speed).

The clock frequency is limited to 3 MHz when PB13 in controller output mode is used.

The clock frequency is limited to 6MHz when PB14 in target output mode is used. In this case, it is the value measured according to the datasheet conditions: IO speed/VDD/Load capacitance. 

Tips

PB13 impact on controller mode:

  • When using SPI2 in controller mode, PB13 limits the max clock frequency on SPI as indicated in the product datasheet.
  • It is recommended to use PB10, PA9, PA12, or PD3 as clock output in controller mode if a high data rate is required.
  • When using SPI2 in target mode and PB13 is used as clock, the max speed is not limited by PB13.

 

PB14 impact on target mode:

  • If SPI2 is used in full duplex target mode, target output on PB14 limits the max data rate on SPI as indicated in the product datasheet.
  • For high-speed communication in target mode, it is recommended to switch PB14 to input (PB14 by default in output mode when SPI2 is target). For this, software can enable the IO swap feature by using Bit 15 IOSWP (swap functionality of MISO and MOSI pins) in SPI_CFG2 register on the SPI2 interface (PB14 will be used as target input in this case).

Related links 

Comments

Hi @Imen.D ,

The right part of tables are not visible and courtesy of the *** #Khoros javascriptoid, on PC there's no standard bar to shift them to the left.

Why are there no-PB13 lines in those tables for master mode (while there *are* no-PB14 lines for slave mode)?

What do those numbers mean, e.g. what is 135/3MHz, is it meant to be 45MHz?

[EDIT] Okay, now I see, it's 135MHz for all other MOSI pins and 3MHz for PB13.

I'd suggest to split this to several tables, this is quite confusing and will fire back later.

I'd also suggest footnotes for PB13/PB14 at the pin table in DS referring to the SPI characteristics, and I'd also suggest mentioning these rather shocking limitations in the SPI chapter in RM.

Is this limitation of PB13/PB14 restricted to SPI? What about GPIO Output, or any other AF on these pins? [/EDIT]

JW

 

Imen.D
ST Employee

Hi @waclawek.jan;

Thank you for your valuable feedback.

>> I'd also suggest footnotes for PB13/PB14 at the pin table in DS referring to the SPI characteristics, and I'd also suggest mentioning these rather shocking limitations in the SPI chapter in RM.

Is this limitation of PB13/PB14 restricted to SPI? What about GPIO Output, or any other AF on these pins? 

I highlighted your message to trigger a Datasheet update and add this.

Thanks 

Imen

Imen.D
ST Employee

Hi @waclawek.jan,

>>The right part of tables are not visible and courtesy of the *** #Khoros javascriptoid, on PC there's no standard bar to shift them to the left.

The tables are fixed.

Thank you again for the continued feedback; it is much appreciated!

AScha.3
Chief II

Hi @Imen.D ,

well, a maximum from 135 -> 3 MHz is not a tiny difference .

So - why this ?

And what happens, when using a higher frequency on these pins ? chip dies ?

And (as Jan asked ) : Is this limitation of PB13/PB14 restricted to SPI? What about GPIO Output, or any other AF on these pins?

Version history
Last update:
‎2024-05-07 02:31 AM
Updated by: