bit banding warning #170
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2010-11-04 4:16 AM
Posted on November 04, 2010 at 12:16
bit banding warning #170
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 5:13 AM
Posted on May 17, 2011 at 14:13
Because your program works perfectly I would not worry. (Else I would have asked you to carefully inspect the generated code - stepping one assembly instruction at a time.) Although I use IAR tools and do not know for sure, I suspect that the compiler knows that addresses in the 0x22000000 range are not valid addresses.
Guessing here but you *may* have two ways of getting rid of the message. Disable warning: #170-D or find out (and correct) where the compiler the compiler “knows�? about valid RAM and I/O addresses.Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5:13 AM
Posted on May 17, 2011 at 14:13
I got a solution by KEIL support which works
unsigned long bf; #define BITBAND_SRAM(a,b) ((SRAM_BB_BASE + (a-SRAM_BASE)*32 + (b*4))) #define _bf0 *((volatile unsigned int *)(BITBAND_SRAM((unsigned long)(unsigned char*)&bf,0))) #define _bf1 *((volatile unsigned int *)(BITBAND_SRAM((unsigned long)(unsigned char*)&bf,1))) I cannot see too much differences - but no more warnings and it still works solid.