Hi all,
I'm rather new to Tiva and am now learning bit-banding. I've read the other posts about it on this site and find it a bit confusing. Instead I've written the following code that I modified from Josehp Yiu's book. The only modification is the addressing from the peripheral alias bank to the SRAM alias bank.
#define DEVICE_REG0_BIT0 *((volatile unsigned long*) (0x22000000)) //Alias to bit 0 of SRAM byte 0x20000000
#define DEVICE_REG0_BIT1 *((volatile unsigned long*) (0x22000004)) //Alias to bit 1 of SRAM byte 0x20000000
... and so on ...
Then in our code...
DEVICE_REG0_BIT1 = 0x1; //Setting bit 1 in SRAM location 0x20000000
What I don't understand is how do I allocate memory in SRAM so the compiler does not allocated 0x20000000 for something else. Also, just wondering what the exports think about this method in general.
Thanks George