Author Topic: DMA Timer Configuration Problem  (Read 8032 times)

Offline rnardone

  • Newbie
  • *
  • Posts: 6
    • View Profile
DMA Timer Configuration Problem
« on: December 26, 2008, 12:32:50 AM »
Hi,

     I seem to be having some problems when I try to use DMA Timer 2 without interrupts.  I simply configure DMA Timer 2 to count at a 1MHz rate as follows:
   

   DTMR2 = (UINT16)0x3B03;   // Config DMA Timer 2 used to count 1us
   DTCN2 = 0;                      // Reset DMA Timer 2 count   
   
     When I include this code in my MCF52233 project, I end up with a default interrupt handler after a very short period of time.  If I comment this code out, my code runs fine.  I have tried DMA Timer 1, but got the same result.  I tried deciphering how I got into the default interrupt handler using "undefined interrupt during startup" post, but was unable to decipher the problem.   I also made sure this interrupt source was masked, but this didn't seem to help either.

     Any suggestions would be greatly appreciated.  I am working on a project which adds on to the uTaskerV1.3 application and have service pack 8 installed. 

     Thanks,

       Rick
      

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: DMA Timer Configuration Problem
« Reply #1 on: December 26, 2008, 12:51:07 PM »
Hi Rick

I am wondering whether it is the access to the DMA registers causing an exception. I can't imagine how the timer itself can cause problems, especially when its interrupt is masked.

Ensure that you are powering up the DMA timer before use:

POWER_UP(POWER_TMR2);

Note that the project disables most peripherals on start up in order to optimize power consumption efficiency and it is therefore up to the user to ensure that the required peripherals are powered up when required (and possibly powered down again when no longer required).

Regards

Mark

Offline rnardone

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: DMA Timer Configuration Problem
« Reply #2 on: December 26, 2008, 02:19:18 PM »
Hi Mark,

     That was the problem!   

     Thanks again for your help!

      - Rick