MPC8313E DMA

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC8313E DMA

1,224 Views
medina
Contributor III
Hello,

I try to use the DMA. When I write to DMAMR0 not all bits have been written.

   I write                            I read after
0x201A8000       ->        0x00188000
0xFFFF0000      ->        0x8EFC0000
0x0000FFFF      ->        0x0000FF0F

why don't be write those bits? Those bit are important.

Best regards,


Medina
0 Kudos
1 Reply

456 Views
medina
Contributor III
Freescale’s Technical Support found the problem. I used swapbit but I had to use a swapbyte in all dma's register.

I used swapbit becouse I used it in gpio's register.

Example:

IN => bit 31 =1, bit 2 =1, rest =0 => 0x80000004

SWAPBIT    => bit 31 -> bit 0 | bit 30 ->bit 1 ......
     Result = bit 0...31 => 0x20000001
SWAPByTe => byte 3 = bit 31..24 | byte 2 = bit 23..16 | byte 1 = bit 15..8 | byte 0 = bit 7..0
                     => byte 3 -> byte 0  |  byte 2 -> byte 1 |  byte 1 -> byte 3|  byte 0 -> byte 3
      Result = bit 7..0 - bit 15..8 - bit 23..16 - bit 31..24 => 0x04000080
 
Regards
0 Kudos