CAN peripheral - bitbanding access
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2009-01-02 5:40 AM
Posted on January 02, 2010 at 14:40
CAN peripheral - bitbanding access
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 4:36 AM
Posted on May 17, 2011 at 13:36
Hi,
I write a CAN driver for the STM32 (bxCAN). I would prefer bitband access to most bit variables However, I did not find any bitband definition of these bits, but only the ''old fashion'' read-modify-write kind - example: #define FMR_FINIT ((uint32_t)0x00000001) /* Filter init mode */ Any idea if there exists any bitband access definition? Thanks, and a Happy New Year! RanOptions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 4:36 AM
Posted on May 17, 2011 at 13:36
See section 4.2 (Bit-banding) in
http://infocenter.arm.com/help/topic/com.arm.doc.ddi0337g/DDI0337G_cortex_m3_r2p0_trm.pdf
. Save it on your computer for easy access. All bits in the 20000000-200FFFFF range have bit band alias address. Ditto 40000000-400FFFFF. (This is an ARM Coretx-M3 feature, not something unique ST put into their STM32 product line.) The latter range includes ST’s various CAN control register addresses. The above has been provided to get you started. You need to do your own bit definition structs, macros, equates or whatever your software requires.