Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NuttX RTOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
f4grx
NuttX RTOS
Commits
fe0f5ce4
Commit
fe0f5ce4
authored
11 years ago
by
Gregory Nutt
Browse files
Options
Downloads
Patches
Plain Diff
STM32 F1 DAM fix from David Sidrane
parent
d2ab68c7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ChangeLog
+3
-0
3 additions, 0 deletions
ChangeLog
arch/arm/src/stm32/stm32f10xxx_dma.c
+12
-3
12 additions, 3 deletions
arch/arm/src/stm32/stm32f10xxx_dma.c
with
15 additions
and
3 deletions
ChangeLog
+
3
−
0
View file @
fe0f5ce4
...
...
@@ -5854,4 +5854,7 @@
ARCH_HAVE_NET that determines if a network is present or not. This
currently can happen if CONFIG_NET is set or if CONFIG_WL_CC3000 is
is set (23013-10-23).
* arch/arm/src/stm32/stm32f10xxx_dma.c: DMA fix from David Sidrane:
The DMA_CNDTRx register cannot be modified if the DMA channel is
disabled (2013-10-23).
This diff is collapsed.
Click to expand it.
arch/arm/src/stm32/stm32f10xxx_dma.c
+
12
−
3
View file @
fe0f5ce4
...
...
@@ -457,11 +457,20 @@ void stm32_dmafree(DMA_HANDLE handle)
*
****************************************************************************/
void
stm32_dmasetup
(
DMA_HANDLE
handle
,
uint32_t
paddr
,
uint32_t
maddr
,
size_t
ntransfers
,
uint32_t
ccr
)
void
stm32_dmasetup
(
DMA_HANDLE
handle
,
uint32_t
paddr
,
uint32_t
maddr
,
size_t
ntransfers
,
uint32_t
ccr
)
{
struct
stm32_dma_s
*
dmach
=
(
struct
stm32_dma_s
*
)
handle
;
uint32_t
regval
;
/* Then DMA_CNDTRx register can only be modified if the DMA channel is
* disabled.
*/
regval
=
dmachan_getreg
(
dmach
,
STM32_DMACHAN_CCR_OFFSET
);
regval
&=
~
(
DMA_CCR_EN
);
dmachan_putreg
(
dmach
,
STM32_DMACHAN_CCR_OFFSET
,
regval
);
/* Set the peripheral register address in the DMA_CPARx register. The data
* will be moved from/to this address to/from the memory after the
* peripheral event.
...
...
@@ -508,7 +517,8 @@ void stm32_dmasetup(DMA_HANDLE handle, uint32_t paddr, uint32_t maddr, size_t nt
*
****************************************************************************/
void
stm32_dmastart
(
DMA_HANDLE
handle
,
dma_callback_t
callback
,
void
*
arg
,
bool
half
)
void
stm32_dmastart
(
DMA_HANDLE
handle
,
dma_callback_t
callback
,
void
*
arg
,
bool
half
)
{
struct
stm32_dma_s
*
dmach
=
(
struct
stm32_dma_s
*
)
handle
;
uint32_t
ccr
;
...
...
@@ -542,7 +552,6 @@ void stm32_dmastart(DMA_HANDLE handle, dma_callback_t callback, void *arg, bool
*/
ccr
|=
(
half
?
(
DMA_CCR_HTIE
|
DMA_CCR_TEIE
)
:
(
DMA_CCR_TCIE
|
DMA_CCR_TEIE
));
}
else
{
...
...
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