This had been touched a couple of times, but in my case, I needed address of UCB0RXBUF as unsigned long for DMA. I presumed UCB0RXBUF is a pointer so I simply do this foo = UCB0RXBUF; bar = (uint32_t) UCB0RXBUF; I get zero both times (it's empty buffer now). I was expecting to get the value (=address of target) of the pointer since I'm not prefixing it by *. Now if I do this foo=&UCB0RXBUF; I get the address I wanted instead of the address of a pointer I was expecting.. It's as if UCB0RXBUF *is* the register as a variable. Texas is doing something clever and these defines actually reside in the memory address they refer to, instead of being pointers to the address? Yes, I know there's a separate DMA function in the driverlib to do exactly this conversion, so I'm apparently hardly the only person confused by it. How does that work in practical terms? There's the .cmd file which contains physical addresses of the defined names. It's placed by the linker to the relevant address? I'm using msp430fr5969 but I presume it's much the same for other models. linker .cmd file and header is located here: C:\ti\ccsv6\ccs_base\msp430\include
↧