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
a8b980ab
Unverified
Commit
a8b980ab
authored
6 years ago
by
Marian Buschsieweke
Browse files
Options
Downloads
Patches
Plain Diff
board/nucleo-f030r8: Added SPI config
parent
a697689c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
boards/nucleo-f030r8/include/periph_conf.h
+50
-0
50 additions, 0 deletions
boards/nucleo-f030r8/include/periph_conf.h
with
50 additions
and
0 deletions
boards/nucleo-f030r8/include/periph_conf.h
+
50
−
0
View file @
a8b980ab
...
...
@@ -139,6 +139,56 @@ static const pwm_conf_t pwm_config[] = {
#define PWM_NUMOF (sizeof(pwm_config) / sizeof(pwm_config[0]))
/** @} */
/**
* @name SPI configuration
*
* @note The spi_divtable is auto-generated from
* `cpu/stm32_common/dist/spi_divtable/spi_divtable.c`
* @{
*/
static
const
uint8_t
spi_divtable
[
2
][
5
]
=
{
{
/* for APB1 @ 48000000Hz */
7
,
/* -> 187500Hz */
6
,
/* -> 375000Hz */
5
,
/* -> 750000Hz */
2
,
/* -> 6000000Hz */
1
/* -> 12000000Hz */
},
{
/* for APB2 @ 48000000Hz */
7
,
/* -> 187500Hz */
6
,
/* -> 375000Hz */
5
,
/* -> 750000Hz */
2
,
/* -> 6000000Hz */
1
/* -> 12000000Hz */
}
};
static
const
spi_conf_t
spi_config
[]
=
{
{
.
dev
=
SPI1
,
.
mosi_pin
=
GPIO_PIN
(
PORT_A
,
7
),
.
miso_pin
=
GPIO_PIN
(
PORT_A
,
6
),
.
sclk_pin
=
GPIO_PIN
(
PORT_A
,
5
),
.
cs_pin
=
GPIO_PIN
(
PORT_A
,
4
),
.
af
=
GPIO_AF0
,
.
rccmask
=
RCC_APB2ENR_SPI1EN
,
.
apbbus
=
APB2
},
{
.
dev
=
SPI2
,
.
mosi_pin
=
GPIO_PIN
(
PORT_B
,
15
),
.
miso_pin
=
GPIO_PIN
(
PORT_B
,
14
),
.
sclk_pin
=
GPIO_PIN
(
PORT_B
,
13
),
.
cs_pin
=
GPIO_PIN
(
PORT_B
,
12
),
.
af
=
GPIO_AF0
,
.
rccmask
=
RCC_APB1ENR_SPI2EN
,
.
apbbus
=
APB1
},
};
#define SPI_NUMOF (sizeof(spi_config) / sizeof(spi_config[0]))
/** @} */
/**
* @name ADC configuration
* @{
...
...
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