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
2fcfc855
You need to sign in or sign up before continuing.
Commit
2fcfc855
authored
7 years ago
by
Vincent Dupont
Browse files
Options
Downloads
Patches
Plain Diff
boards/nucleo144-f413: adapt board config to use DMA
parent
8fc63738
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
boards/nucleo144-f413/Makefile.features
+1
-0
1 addition, 0 deletions
boards/nucleo144-f413/Makefile.features
boards/nucleo144-f413/include/periph_conf.h
+39
-10
39 additions, 10 deletions
boards/nucleo144-f413/include/periph_conf.h
with
40 additions
and
10 deletions
boards/nucleo144-f413/Makefile.features
+
1
−
0
View file @
2fcfc855
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED
+=
periph_adc
FEATURES_PROVIDED
+=
periph_dma
FEATURES_PROVIDED
+=
periph_gpio
FEATURES_PROVIDED
+=
periph_i2c
FEATURES_PROVIDED
+=
periph_pwm
...
...
This diff is collapsed.
Click to expand it.
boards/nucleo144-f413/include/periph_conf.h
+
39
−
10
View file @
2fcfc855
...
...
@@ -71,6 +71,29 @@ extern "C" {
#define CLOCK_USE_ALT_48MHZ (1)
/** @} */
/**
* @name DMA streams configuration
* @{
*/
#ifdef MODULE_PERIPH_DMA
static
const
dma_conf_t
dma_config
[]
=
{
{
.
stream
=
4
},
{
.
stream
=
14
},
{
.
stream
=
6
},
{
.
stream
=
10
},
{
.
stream
=
8
},
};
#define DMA_0_ISR isr_dma1_stream4
#define DMA_1_ISR isr_dma2_stream6
#define DMA_2_ISR isr_dma1_stream6
#define DMA_3_ISR isr_dma2_stream2
#define DMA_4_ISR isr_dma2_stream0
#define DMA_NUMOF (sizeof(dma_config) / sizeof(dma_config[0]))
#endif
/** @} */
/**
* @name Timer configuration
* @{
...
...
@@ -104,9 +127,9 @@ static const uart_conf_t uart_config[] = {
.
tx_af
=
GPIO_AF7
,
.
bus
=
APB1
,
.
irqn
=
USART3_IRQn
,
#ifdef
UART_USE
_DMA
.
dma
_stream
=
6
,
.
dma_chan
=
4
#ifdef
MODULE_PERIPH
_DMA
.
dma
=
0
,
.
dma_chan
=
7
,
#endif
},
{
...
...
@@ -118,9 +141,9 @@ static const uart_conf_t uart_config[] = {
.
tx_af
=
GPIO_AF8
,
.
bus
=
APB2
,
.
irqn
=
USART6_IRQn
,
#ifdef
UART_USE
_DMA
.
dma
_stream
=
5
,
.
dma_chan
=
4
#ifdef
MODULE_PERIPH
_DMA
.
dma
=
1
,
.
dma_chan
=
5
,
#endif
},
{
...
...
@@ -132,9 +155,9 @@ static const uart_conf_t uart_config[] = {
.
tx_af
=
GPIO_AF7
,
.
bus
=
APB1
,
.
irqn
=
USART2_IRQn
,
#ifdef
UART_USE
_DMA
.
dma
_stream
=
4
,
.
dma_chan
=
4
#ifdef
MODULE_PERIPH
_DMA
.
dma
=
3
,
.
dma_chan
=
4
,
#endif
},
};
...
...
@@ -212,7 +235,13 @@ static const spi_conf_t spi_config[] = {
.
cs_pin
=
GPIO_PIN
(
PORT_A
,
4
),
.
af
=
GPIO_AF5
,
.
rccmask
=
RCC_APB2ENR_SPI1EN
,
.
apbbus
=
APB2
.
apbbus
=
APB2
,
#ifdef MODULE_PERIPH_DMA
.
tx_dma
=
3
,
.
tx_dma_chan
=
2
,
.
rx_dma
=
4
,
.
rx_dma_chan
=
3
,
#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