COLD FIRE

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

COLD FIRE

3,667 Views
rao
Contributor I
Hai all,
 Can anybody  sedn an example code which explains the usage of general purpose timer module in mcf5282.
Please include initialization of various memories like SDRAM  ,IPSBAR etc..
  Thanks in advonce.
Labels (1)
0 Kudos
4 Replies

513 Views
mpeters
Contributor I
Rao,

Sample code that shows all of the initialization of the processor, memories, etc., can be downloaded from the MCF5282 product summary page. It is located in the "Software" section, and the link is entitled "MCF5282SC". Here is the link to the MCF5282 product summary page:
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MCF5282&nodeId=0162468rH3YTLC00M95448

We don't have any code specifically for the GPT on the MCF5282, however attached is some code that was written for the GPT on the MCF5213. The MCF5282 and MCF5213 use the same GPT module, so this is a good reference and the code should be helpful to you.

Regards,
mpeters

Message Edited by mpeters on 04-11-2006 10:55 AM

0 Kudos

513 Views
rwehrli
Contributor I
mpeters,

Do you also happen to have PIT timer sample code? I've been able to configure the timer, but haven't been able to get it to produce an interrupt on the M5211DEMO board using CW 6.4.

In my mcf5xxx_vectors.s I have at the top:


.extern IRQ_PIT0

...nothing else changed until...

vector055: .long IRQ_PIT0

In main.c I have:

void IRQ_PIT0( void )
{
printf( "IRQ_PIT0\r\n" );
}

And, interestingly, if I don't make a call to it in main, IRQ_PIT0 is never linked as a defined symbol, as shown in the produced map file.

So, I put a call to it at the top of main, found it my linker map, but still no interrupt.

MCF_PIT0_PCSR = 0x023B;
MCF_PIT0_PMR = 0x0040;

...is my current PIT0 configuration. Perhaps I've got things improperly configured?

Is there some other method of configuring interrupt handlers that I haven't yet figured out? I've only had about 3 hours with this board.


Take Care.

Rob!
0 Kudos

513 Views
mccPaul
Contributor I
Hi
 
 
This is specifically aimed at the mcf5282, but the timers are very similar, if not identical between the Coldfire parts, just check the manual if you aren't using the 5282.
 
Paul.
0 Kudos

513 Views
rao
Contributor I
Thank you Mr Mpeters.
0 Kudos