Volker Kugler

Questions about M52233DEMO, flash and IRQ problems

Discussion created by Volker Kugler on Sep 4, 2006
Latest reply on Sep 6, 2006 by Mark Butcher
Hi,

i tried the web server demo program, coming with the board, and with this demo flashing is possible. But when i make a new project like "Hello world", it runs in debug and run mode, but when flashing i get an error message:

0x00001918 bytes of Target Memory at 0x20000500 is not within flash boundaries. 

I choose the CFM_MCF52233_25MHz.xml File, the Target processor 5223x and the M52235EVB_PnE.cfg file for flashing.

Another problem that i have is, that i am to stupid to implement a working PIT. I try the following code:
Code:
    /* PIT0 enabled        PIT0 timeout period = 1.00 seconds        Counter wraps to 0xFFFF when it reaches zero        Writing to PMR replaces value in PIT counter when count reaches 0x0000        Interrupt when timer expires is enabled        Timer continues to run in DOZE mode        Timer continues to run in Debug mode     */    /*     PCSR0[PRE]      = %1001            PCSR0[DOZE]     = 0             PCSR0[DBG]      = 0             PCSR0[OVW]      = 0             PCSR0[PIE]      = 1             PCSR0[PIF]      = 0             PCSR0[RLD]      = 0             PCSR0[EN]       = 1      */    MCF_PIT0_PCSR = MCF_PIT_PCSR_PRE(0x9) |                    MCF_PIT_PCSR_PIE      |                    MCF_PIT_PCSR_EN;    /*     PMR0[PM]        = $e5af */    MCF_PIT0_PMR = MCF_PIT_PMR_PM(0xe5af);    /* PIT1 disabled (PCSR1[EN]=0) */    /*     PCSR1[PRE]      = 0             PCSR1[DOZE]     = 0             PCSR1[DBG]      = 0             PCSR1[OVW]      = 0             PCSR1[PIE]      = 0             PCSR1[PIF]      = 0             PCSR1[RLD]      = 0             PCSR1[EN]       = 0      */    MCF_PIT1_PCSR = 0;and change the vector table like this:vector69:    .long    _my_timer_irq_handler // Source 41: Timer overflowvector6A:    .long    _irq_handler      // Source 42: Pulse accumulator input vector6B:    .long    _irq_handler      // Source 43: Pulse accumulator overflowvector6C:    .long    _my_timer_irq_handler // Source 44: Timer channel 0vector6D:    .long    _irq_handler      // Source 45: Timer channel 1vector6E:    .long    _irq_handler      // Source 46: Timer channel 2vector6F:    .long    _irq_handler      // Source 47: Timer channel 3vector70:    .long    _irq_handler      // Source 48: LVDvector71:    .long    _irq_handler      // Source 49: ADCA conversion completevector72:    .long    _irq_handler      // Source 50: ADCB conversion completevector73:    .long    _irq_handler      // Source 51: ADC IRQvector74:    .long    _irq_handler      // Source 52: PWM IRQvector75:    .long    _irq_handler      // Source 53: RNGA IRQvector76:    .long    _irq_handler      // Source 54: Reservedvector77:    .long    _my_timer_irq_handler // Source 55: PIT0 IRQ Flagvector78:    .long    _irq_handler      // Source 56: PIT1 IRQ Flagvector79:    .long    _irq_handler      // Source 57: Reserved vector7A:    .long    _irq_handler      // Source 58: Reservedvector7B:    .long    _irq_handler      // Source 59: SGFM buffer emptyvector7C:    .long    _irq_handler      // Source 60: SGFM command completevector7D:    .long    _irq_handler      // Source 61: Protection violationvector7E:    .long    _irq_handler      // Source 62: Access errorvector7F:    .long    _my_timer_irq_handler    // Source 63: RTC Interrupt

 
But my_timer_irq_handler will never be reached.

Can you explain me how to activate a PIT0-IRQ or make an example available for me?

Many thanks for your help.

Volker

Message Edited by Alban on 2006-09-06 02:24 PM

Outcomes