Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
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
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
4d400aa7
Commit
4d400aa7
authored
11 years ago
by
px4dev
Browse files
Options
Downloads
Patches
Plain Diff
Enable UART error handling on PX4IO.
parent
87a4f150
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/modules/px4iofirmware/serial.c
+3
-4
3 additions, 4 deletions
src/modules/px4iofirmware/serial.c
with
3 additions
and
4 deletions
src/modules/px4iofirmware/serial.c
+
3
−
4
View file @
4d400aa7
...
...
@@ -129,8 +129,8 @@ interface_init(void)
irq_attach
(
PX4FMU_SERIAL_VECTOR
,
serial_interrupt
);
up_enable_irq
(
PX4FMU_SERIAL_VECTOR
);
/* enable UART and
DMA
*/
/*
rCR3 = USART_CR3_EIE;
*/
/* enable UART and
error/idle interrupts
*/
rCR3
=
USART_CR3_EIE
;
rCR1
=
USART_CR1_RE
|
USART_CR1_TE
|
USART_CR1_UE
|
USART_CR1_IDLEIE
;
#if 0 /* keep this for signal integrity testing */
...
...
@@ -259,7 +259,6 @@ serial_interrupt(int irq, void *context)
uint32_t
sr
=
rSR
;
/* get UART status register */
(
void
)
rDR
;
/* required to clear any of the interrupt status that brought us here */
#if 0
if
(
sr
&
(
USART_SR_ORE
|
/* overrun error - packet was too big for DMA or DMA was too slow */
USART_SR_NE
|
/* noise error - we have lost a byte due to noise */
USART_SR_FE
))
{
/* framing error - start/stop bit lost or line break */
...
...
@@ -278,7 +277,7 @@ serial_interrupt(int irq, void *context)
/* don't attempt to handle IDLE if it's set - things went bad */
return
0
;
}
#endif
if
(
sr
&
USART_SR_IDLE
)
{
/* the packet might have been short - go check */
...
...
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