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
d31aefe4
Commit
d31aefe4
authored
8 years ago
by
Paul A. Patience
Browse files
Options
Downloads
Patches
Plain Diff
STM32 CAN: Add support for both RX FIFOs
parent
add152bf
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
arch/arm/src/stm32/chip/stm32_can.h
+6
-3
6 additions, 3 deletions
arch/arm/src/stm32/chip/stm32_can.h
arch/arm/src/stm32/stm32_can.c
+190
-100
190 additions, 100 deletions
arch/arm/src/stm32/stm32_can.c
with
196 additions
and
103 deletions
arch/arm/src/stm32/chip/stm32_can.h
+
6
−
3
View file @
d31aefe4
...
...
@@ -75,8 +75,11 @@
#define STM32_CAN_MCR_OFFSET 0x0000
/* CAN master control register */
#define STM32_CAN_MSR_OFFSET 0x0004
/* CAN master status register */
#define STM32_CAN_TSR_OFFSET 0x0008
/* CAN transmit status register */
#define STM32_CAN_RFR_OFFSET(m) (0x000c+((m)<<2))
#define STM32_CAN_RF0R_OFFSET 0x000c
/* CAN receive FIFO 0 register */
#define STM32_CAN_RF1R_OFFSET 0x0010
/* CAN receive FIFO 1 register */
#define STM32_CAN_IER_OFFSET 0x0014
/* CAN interrupt enable register */
#define STM32_CAN_ESR_OFFSET 0x0018
/* CAN error status register */
#define STM32_CAN_BTR_OFFSET 0x001c
/* CAN bit timing register */
...
...
@@ -127,8 +130,8 @@
#define STM32_CAN_FFA1R_OFFSET 0x0214
/* CAN filter FIFO assignment register */
#define STM32_CAN_FA1R_OFFSET 0x021c
/* CAN filter activation register */
/* There are 14 or 28 filter banks (depending) on the device.
Each filter bank is
* composed of two 32-bit registers, CAN_FiR:
/* There are 14 or 28 filter banks (depending) on the device.
*
Each filter bank is
composed of two 32-bit registers, CAN_FiR:
* F0R1 Offset 0x240
* F0R2 Offset 0x244
* F1R1 Offset 0x248
...
...
@@ -445,7 +448,7 @@
/* CAN filter master register */
#define CAN_FMR_FINIT (1 << 0)
/* Bit 0:
Filter Init Mode */
#define CAN_FMR_FINIT (1 << 0)
/* Bit 0: Filter Init Mode */
#if defined(CONFIG_STM32_CONNECTIVITYLINE) || defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F40XX)
# define CAN_FMR_CAN2SB_SHIFT (8)
/* Bits 13-8: CAN2 start bank */
# define CAN_FMR_CAN2SB_MASK (0x3f << CAN_FMR_CAN2SB_SHIFT)
...
...
This diff is collapsed.
Click to expand it.
arch/arm/src/stm32/stm32_can.c
+
190
−
100
View file @
d31aefe4
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