cancel
Showing results for 
Search instead for 
Did you mean: 

Changing SPI Prescaler Value on Nucleo-L476RG

TNguy.18
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

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".

View solution in original post

1 REPLY 1
TDK
Guru

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".