1. Config: MSP430F5659, CCS6, compiler 4.4.3 coffabi, --silicon_version=mspx,
--code_model=large --data_model=large --near_data=none
2. I'm switching from the restricted memory model to the large and having trouble with DMA.
Here is the code snippet that I am having trouble with (this works fine before we exceeded the RAM boundary 0x2400-0x6400 region and are into RAM2 0xf0000 - 0xfc0000):
_data20_write_long((uintptr_t) &DMA0SA, // Source: write data pointer.
(uintptr_t) dma_request_current->mosi);
The value for dma_request_current->mosi = 0xf61b6.
3. Here is the assembly code copied from the debugger:
442 _data20_write_long((uintptr_t) &DMA0SA, // Source: write data pointer.
011e10: 432F MOV.W #2,R15
011e12: 1F80 525F 619C ADDX.A &dma_request_current,R15
011e18: 4F2E MOV.W @R15,R14
011e1a: 0F0F MOVA @R15,R15
011e1c: 190F 104F RPT #16 RRUX.A R15
011e20: 4F0F MOV.W R15,R15 // NOOP?
011e22: 008D 0512 MOVA #0x00512,R13
011e26: 4E8D 0000 MOV.W R14,0x0000(R13)
011e2a: 4F8D 0002 MOV.W R15,0x0002(R13)
4. As far as I can tell this assembly is perfect. As I single step through the assembly I see that the following registers get set:
R13 = 0x512 // DMA0SA address
R14 = 0x61B6
R15 = 0x000F
In line 011e26: I see DMA0SA is set to 0x61B6
However, line 0011e2a: has no effect!
In the debugger, both using the Register view and Memory Browser I cannot set the upper 4 bits of DMA0SA. It just will not happen. Which explains why assembly line 011e2a has no effect. It should set the upper 4 bits to 0xF.
What is going on here?