Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
bd1b309c
Commit
bd1b309c
authored
6 years ago
by
Leandro Lanzieri
Browse files
Options
Downloads
Patches
Plain Diff
cpu/stm32l1: Add support for stm32l151cb CPU
parent
334f8285
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cpu/stm32l1/include/cpu_conf.h
+6
-3
6 additions, 3 deletions
cpu/stm32l1/include/cpu_conf.h
cpu/stm32l1/include/periph_cpu.h
+3
-1
3 additions, 1 deletion
cpu/stm32l1/include/periph_cpu.h
with
9 additions
and
4 deletions
cpu/stm32l1/include/cpu_conf.h
+
6
−
3
View file @
bd1b309c
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
* * STM32L1XX_XL: Ultra Low Power XL-density devices: STM32L151xExx,
* * STM32L1XX_XL: Ultra Low Power XL-density devices: STM32L151xExx,
* STM32L152xExx and STM32L162xExx
* STM32L152xExx and STM32L162xExx
*/
*/
#if defined(CPU_MODEL_STM32L151RBA)
#if defined(CPU_MODEL_STM32L151RBA)
|| defined(CPU_MODEL_STM32L151CB)
#define STM32L1XX_MD (1U)
#define STM32L1XX_MD (1U)
#elif defined(CPU_MODEL_STM32L151RC)
#elif defined(CPU_MODEL_STM32L151RC)
#define STM32L1XX_MDP (1U)
#define STM32L1XX_MDP (1U)
...
@@ -64,7 +64,7 @@ extern "C" {
...
@@ -64,7 +64,7 @@ extern "C" {
* @{
* @{
*/
*/
#define CPU_DEFAULT_IRQ_PRIO (1U)
#define CPU_DEFAULT_IRQ_PRIO (1U)
#if defined(CPU_MODEL_STM32L151RBA)
#if defined(CPU_MODEL_STM32L151RBA)
|| defined(CPU_MODEL_STM32L151CB)
#define CPU_IRQ_NUMOF (45U)
#define CPU_IRQ_NUMOF (45U)
#else
#else
#define CPU_IRQ_NUMOF (57U)
#define CPU_IRQ_NUMOF (57U)
...
@@ -76,7 +76,7 @@ extern "C" {
...
@@ -76,7 +76,7 @@ extern "C" {
* @name Flash page configuration
* @name Flash page configuration
* @{
* @{
*/
*/
#if defined(CPU_MODEL_STM32L152RE) || defined(CPU_MODEL_STM32L151RC)
#if defined(CPU_MODEL_STM32L152RE) || defined(CPU_MODEL_STM32L151RC)
|| defined(CPU_MODEL_STM32L151CB)
#define FLASHPAGE_SIZE (256U)
#define FLASHPAGE_SIZE (256U)
#if defined(CPU_MODEL_STM32L152RE)
#if defined(CPU_MODEL_STM32L152RE)
#define FLASHPAGE_NUMOF (2048U)
/* 512KB */
#define FLASHPAGE_NUMOF (2048U)
/* 512KB */
...
@@ -84,6 +84,9 @@ extern "C" {
...
@@ -84,6 +84,9 @@ extern "C" {
#if defined(CPU_MODEL_STM32L151RC)
#if defined(CPU_MODEL_STM32L151RC)
#define FLASHPAGE_NUMOF (1024U)
/* 256KB */
#define FLASHPAGE_NUMOF (1024U)
/* 256KB */
#endif
#endif
#if defined(CPU_MODEL_STM32L151CB)
#define FLASHPAGE_NUMOF (512U)
/* 128KB */
#endif
#endif
#endif
/* The minimum block size which can be written is 4B. However, the erase
/* The minimum block size which can be written is 4B. However, the erase
* block is always FLASHPAGE_SIZE.
* block is always FLASHPAGE_SIZE.
...
...
This diff is collapsed.
Click to expand it.
cpu/stm32l1/include/periph_cpu.h
+
3
−
1
View file @
bd1b309c
...
@@ -30,7 +30,7 @@ extern "C" {
...
@@ -30,7 +30,7 @@ extern "C" {
/**
/**
* @name Starting address of the CPU ID
* @name Starting address of the CPU ID
*/
*/
#ifdef
CPU_MODEL_STM32L151RBA
#if
def
ined(
CPU_MODEL_STM32L151RBA
) || defined(CPU_MODEL_STM32L151CB)
#define CPUID_ADDR (0x1ff80050)
#define CPUID_ADDR (0x1ff80050)
#else
#else
#define CPUID_ADDR (0x1ff800d0)
#define CPUID_ADDR (0x1ff800d0)
...
@@ -82,6 +82,8 @@ typedef enum {
...
@@ -82,6 +82,8 @@ typedef enum {
#define EEPROM_SIZE (16384UL)
/* 16kB */
#define EEPROM_SIZE (16384UL)
/* 16kB */
#elif defined(CPU_MODEL_STM32L151RC)
#elif defined(CPU_MODEL_STM32L151RC)
#define EEPROM_SIZE (8192U)
/* 8kB */
#define EEPROM_SIZE (8192U)
/* 8kB */
#elif defined(CPU_MODEL_STM32L151CB)
#define EEPROM_SIZE (4096U)
/* 4kB */
#endif
#endif
/** @} */
/** @} */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment