Hi experts,
Could you tell me how to transfer data to a 20-bit address using DMA on MSP430F5x?
I was able to write 0x14000 and 0x14020 to DMAxSA and DMAxDA, but the data is not being transferred properly.
[Check details]
I did some experiments in the following environment referring to the original thread.
- MSP430F5529-LP
- MSP430F55xx_dma_01.c
- CCS:v10.4.0
- Compiler: 20.2.5.LTS
| Pattern | 1 | 2 | 3 |
| .c | __data20_write_long((uintptr_t) &DMA0SA,(uintptr_t) 0x14000); __data20_write_long((uintptr_t) &DMA0DA,(uintptr_t) 0x14020); |
__data20_write_long((unsigned long) &DMA0SA,(unsigned long) 0x14000); __data20_write_long((unsigned long) &DMA0DA,(unsigned long) 0x14020); |
__data16_write_addr((uintptr_t) &DMA0SA,(uintptr_t) 0x14000); __data16_write_addr((uintptr_t) &DMA0DA,(uintptr_t) 0x14020); |
| .asm | MOVX.A #DMA0SA+0,r15 MOV.W #7168,0(r15) MOV.W #0,2(r15) MOVX.A #DMA0DA+0,r15 MOV.W #7200,0(r15) MOV.W #0,2(r15) |
MOVX.A #DMA0SA+0,r15 MOV.W #16384,0(r15) MOV.W #1,2(r15) MOVX.A #DMA0DA+0,r15 MOV.W #16416,0(r15) MOV.W #1,2(r15) |
MOV.W #DMA0SA+0,r15 MOVX.A #0x14000,0(r15) MOV.W #DMA0DA+0,r15 MOVX.A #0x14020,0(r15) |
| Result |
DMA0SA=0x04000 |
DMA0SA=0x04000 DMA0DA=0x04020 |
DMA0SA=0x14000 DMA0DA=0x14020 |
The only correct register setting is pattern3. However, the data at 0x14000 will not be transferred to 0x14020. Also, what is puzzling is that patterns1 and 2 output "MOVX.A" when checked in the .asm file, but when checked in Disassembly, the output changes to "MOVA".
I would appreciate it if you could point out any mistakes in the settings or descriptions.
Best regards,
O.H