cancel
Showing results for 
Search instead for 
Did you mean: 

What documents describe how to confiure SPI, I2C and USART stm32l151rd

george239955_st
Associate II
Posted on April 16, 2013 at 15:16

I can't find the relevant documents they don't seem to be listed with the  product

#lmgtfy:-stm32-resources
11 REPLIES 11
Posted on April 16, 2013 at 15:31

Google ''STM32L151RD'', top hit is for ST's product page.

Select ''Design Resource'' tab

Scroll to ''Reference Manual''

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/reference_manual/CD00240193.pdf

If this is inadequate for your purposes, refer also the firmware library with examples, and documentation for the protocol/interfaces in general.
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
george239955_st
Associate II
Posted on April 16, 2013 at 15:43

thanks Clive,

I'm trying to work out what the max baud rate for the SPI, I2C and USART when running from the 4.2 MHz MSI

this doesn't seem to be covered in the reference manual, any idea what documents I could get this from.  I can't see what document would cover this in the STM32L151RD design resources.

http://www.st.com/web/catalog/mmc/FM141/SC1169/SS1295/LN962/PF251634#

Posted on April 16, 2013 at 16:01

The clock tree is described in the aforementioned manual, as are registers for the peripherals, and the clock dividers/prescalers which they configure.

The USART speed will be limited by the rate of the APB to which it is attached, and the 8 times over sampling rate. If clocked at 4.2 MHz the highest baud rate would be 525 Kbaud. Observe also the ''USART block diagram'' for internal relationships.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
george239955_st
Associate II
Posted on April 16, 2013 at 17:02

thanks Clive,

do you know why the reference manual shows 2 values of clock divider for each setting of the baud rate control register on page 715 of the reference manual RM0038?

Posted on April 16, 2013 at 17:15

do you know why the reference manual shows 2 values of clock divider for each setting of the baud rate control register on page 715 of the reference manual RM0038?

I'm look at RM0038 Rev 7, which figure/table is that?
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
george239955_st
Associate II
Posted on April 16, 2013 at 17:31

27.5.1 page 744 on rev 7

Posted on April 16, 2013 at 17:58

PDF sucks

000: fPCLK/2

100: fPCLK/32

001: fPCLK/4

101: fPCLK/64

010: fPCLK/8

110: fPCLK/128

011: fPCLK/16

111: fPCLK/256

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
george239955_st
Associate II
Posted on April 16, 2013 at 18:08

thanks dude!

Posted on April 16, 2013 at 18:18

Note ST Moderators and Technical Writers, there are several tables in this RM0038 document that run together in an unhelpful manner. Please resolve/address.

0690X0000060502QAA.png
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..