Skip to main content
placidity.master_gmail.com
Associate III
December 23, 2020
Solved

RM0316 spi clock

  • December 23, 2020
  • 3 replies
  • 883 views

IN the rm0316 documentation, there is no explicit indication of where and which SPI interface takes the clock, you have to "guess through who turns on this periphery", which is not "strictly deterministic behavior". the documentation is done formally and wildly not finalized.

the SPI description States: fPCLK, and there is no strictly PCLK1 or PCLK2.

This topic has been closed for replies.
Best answer by Imen GH

Hello @placidity.master_gmail.com​ ,

What you are saying is valid also for other peripherals specifications. In the peripheral’s specifications, we try to be as generic as possible. For example, there are SPI instances mapped on APB1 and others mapped on APB2. So, to be generic, we put APB and to have precise information about which APB, the user should refer to section 3.2.2 Memory map and register boundary addresses (Table 2. STM32F303xB/C and STM32F358xC peripheral register boundary addresses). If the SPI instance is mapped to APB1 then its clock is from APB1, if it is mapped to APB2 then its clock is from APB2.

Imen

3 replies

Imen GH
Imen GHBest answer
ST Employee
December 23, 2020

Hello @placidity.master_gmail.com​ ,

What you are saying is valid also for other peripherals specifications. In the peripheral’s specifications, we try to be as generic as possible. For example, there are SPI instances mapped on APB1 and others mapped on APB2. So, to be generic, we put APB and to have precise information about which APB, the user should refer to section 3.2.2 Memory map and register boundary addresses (Table 2. STM32F303xB/C and STM32F358xC peripheral register boundary addresses). If the SPI instance is mapped to APB1 then its clock is from APB1, if it is mapped to APB2 then its clock is from APB2.

Imen

Technical Moderator
January 8, 2021

Hello @placidity.master_gmail.com​ ,

If your question is answered, please mark Imen's reply as best answer by clicking on "Select as Best".  This will help other users find this solution more quickly.

If you still need help, feel free to ask your question in more detail.

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
waclawek.jan
Super User
January 13, 2021

Hi @Imen DAHMEN​  and @Imen GH​  ,

While what you write is maybe considered "common knowledge", couldn't the RMs say so explicitly, in the RCC section? Something like "All peripherals' clocks are equal to the APB/AHB bus clock on which they are located, unless there is a dedicated clock for them (which then is set in RCC_xxxx register(s))"?

Thanks for considering this,

Jan