-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #217 from TG9541/stm8l-1
fixes #216: STM8L051F3 USART TX:PA2/RX:PA3 as the default
- Loading branch information
Showing
2 changed files
with
26 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#STM8L051F3P6 Base Image | ||
|
||
By default, the USART interface for the STM8L051F3 is configured to support the LSE clock feature (which requires a 32768Hz crystal to be connected to PC5/PC6). | ||
|
||
![stm8l051f3p6_](https://user-images.githubusercontent.com/5466977/40583511-8462f470-6190-11e8-8674-84338a991f58.png) | ||
|
||
Should a different USART setting be required the configuration can be changed in `boardcore.inc`, or in start-up Forth code, e.g.: | ||
|
||
``` | ||
\res MCU: STM8L051 | ||
\res export SYSCFG_RMPCR1 PA_DDR PA_CR1 PC_DDR PC_CR1 | ||
#require ]B! | ||
#require ]C! | ||
: init ( -- ) \ assign STM8L051 USART to PC5:TX, PC6:RX | ||
[ 0 PA_DDR 2 ]B! | ||
[ 0 PA_CR1 2 ]B! | ||
[ 1 PC_DDR 5 ]B! | ||
[ 1 PC_CR1 5 ]B! | ||
[ $0C SYSCFG_RMPCR1 ]C! | ||
; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters