Skip to main content
TNguy.18
Associate II
September 6, 2020
Solved

Changing SPI Prescaler Value on Nucleo-L476RG

  • September 6, 2020
  • 1 reply
  • 1336 views

Hi,

I am pretty new to programming STM32 MCUs and I have been having a hard time finding out how to change the SPI prescaler value on my Nucleo-L476RG board. I am trying to implement FatFS using SPI via an online tutorial and their method of changing the prescaler seems to only work with the Nucleo-F303RE board. I have attached a photo below of their implementation and the error message I am receiving. Is there any other way of going about this?

Thanks,

Timothy

0693W000003Qrf1QAC.png

0693W000003Qrf6QAC.png

This topic has been closed for replies.
Best answer by TDK

The F3 has a different SPI peripheral than the L4 family. In particular, there is no "I2SPR" register as the error message notes.

On the L4, the baud rate can be controlled by the SPIx_CR1_BR field, but the rates available are a bit more limited. From the reference manual:

0693W000003QrvYQAS.png

1 reply

TDK
TDKBest answer
September 6, 2020

The F3 has a different SPI peripheral than the L4 family. In particular, there is no "I2SPR" register as the error message notes.

On the L4, the baud rate can be controlled by the SPIx_CR1_BR field, but the rates available are a bit more limited. From the reference manual:

0693W000003QrvYQAS.png

"If you feel a post has answered your question, please click ""Accept as Solution""."