DMA Initialization problems in C5410

Started by Unknown February 22, 2002

Hi group,

I am having problems with DMA Initialization in C5410. The specific problem I am
facing is, I have written an initialization code to enable DMA channel 4 as Auto
Buffering Unit. When I run my code for the first time - it does not work, but if
I halt the DSP, then reset the DSP and then again reload the program and run it
- DMA starts functioning (I can say this because now channel 4 interrupts start
coming and I can see that the buffer where DMA writes the data gets changed)

I have needled the problem to the gel file - which has a function DMA_Reset().
This function writest ZEROS in the DMPREC, and then goes on to write zeros in
DMSFC and DMMCR for all the 6 channels.
If I comment this function, the program works in the first run.

However, I still have doubts as to what may be going wrong. I think I am not
initializing the DMA properly or may be my order of initialization is not
correct. I initialize the DMA in following manner:
1.) Init - Source Register.
2.) Init - Dest Register.
3.) Init - Element Count Register.
4.) Init - Synch And Frame Count Register.
5.) Init - Index Register.
6.) Init - DMPREC - where I enable channel 4.

I then initialize the IMR and IFR.

Any pointers / code would be most helpful.

Thanks in advance,
"DISCLAIMER: This message is proprietary to Hughes Software Systems Limited
(HSS) and is intended solely for the use of the individual to whom it is
addressed. It may contain privileged or confidential information and should
not be circulated or used for any purpose other than for what it is intended. If
you have received this message in error, please notify the originator
immediately. If you are not the intended recipient, you are notified that you
are strictly prohibited from using, copying, altering, or disclosing the
contents of this message. HSS accepts no responsibility for loss or damage
arising from the use of the information transmitted by this email including
damage from virus."