DSPRelated.com
Forums

Re: how to initialize the DMA register in C code?

Started by zhit...@mail.ru March 13, 2007
you can use macro

Void DMA_RSET (REG, Uint16 regval)
>
>
>
> Jane,
>
>You need to change the address of DMSA to be 0x55. The current
>address (0x56) is actually the DMSDI (Subbank Access Register with
>Autoincrement). Any access you make to this will cause the address
>to increment by 1 and will access the DMA register (which is causing
>the behavior you see).
>
>-Robert
>
>--- In c54x@y..., Jane Shen wrote:
>> Hi,all,
>>
>> When I declared:
>>
>> volatile unsigned int *DMSA=(volatile unsigned int *)0x56;
>> volatile unsigned int *DMDSN=(volatile unsigned int *)0x57;
>>
>> and later:
>> *DMSA=0x19; /*point to SRC5*/
>> *DMDSN=0x1111; /*assign 0x1111 to SRC5*/
>>
>> It turns out that my DST5 is changed to 0x19 and CTR5 changed to
>0x1111.
>> When I re-run it, the CTR5 changed to 0x19 and SFC5 changed to
>0x1111.
>> Can I initialize the DMA registers in C code, I mean not using the
>> embedded asm code in C? Anyone has the experience of this? Would you
>> please help?
>>
>> Your kind help will be very much appreciated.
>>
>>
>> Best,
>>
>>
>> Jane SHEN
>> Tri-Link Technologies Inc.
>> #301-8988, Fraserton Court
>> Burnaby, BC V5J 5H8
>> Tel: (604) 451-9113
>> Fax: (604) 451-9118
>> Email: janes@t...
>
>
>
>
>
>