How can I insert my ISR in MQX?

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

How can I insert my ISR in MQX?

Jump to solution
3,079 Views
admin
Specialist II

Hi,

working in MQX I don't understand how I can insert my ISR that use DMA timer 0. 

I'm using M52259EVB with MQX_ROM_VECTOR 0, is DMA timer 0 interrupt already used by MQX RTOS? Can I use this interrupt for my application? 

 

0 Kudos
Reply
1 Solution
1,500 Views
sven_kaemmer
Contributor III

Hi, look at the following post, perhaps it can help you.

 

 

https://community.freescale.com/message/60274#60274

View solution in original post

0 Kudos
Reply
5 Replies
1,500 Views
admin
Specialist II

Thanks for the support.

0 Kudos
Reply
1,500 Views
admin
Specialist II

With this code now the interrupt is running in MQX but I have to set the DTIM3 manually ... can I do it or should I use MQX routines?

 

static void (_CODE_PTR_ old_isr_dtim3)(pointer);


MCF_DTIM3_DTMR = BASE_TIMER_CLK_BUS_1 | BASE_TIMER_PRESCALER_1 | BASE_TIMER_RESET_AFTER_MATCH | BASE_TIMER_INT_ENABLED | BASE_TIMER_DISABLED;


MCF_DTIM3_DTXMR = BASE_TIMER_STEP_1 | BASE_TIMER_CONTINUE_HALTED | BASE_TIMER_DMA_REQUEST_DISABLED;                


MCF_DTIM3_DTRR = BASE_TIMER_REFERENCE_VALUE;


MCF_DTIM3_DTER |= (uint_8)0x03;                //Clear reference flag


old_isr_dtim3=_int_install_isr(MCF5225_INT_DTIM3, (void (_CODE_PTR_)(pointer))isrINT_DTIM3, NULL);


MCF_INTC0_ICR22 = (uint_8)((DTIM3_INTERRUPT_LEVEL << 3) | DTIM3_INTERRUPT_PRIORITY);


MCF_INTC0_IMRL &= ~IMRL3_TBASE_MASK;


if (NULL == old_isr_dtim3)
        return IO_ERROR; /* could not install new interrupt routine */
        
MCF_DTIM3_DTMR |= (uint_16)0x0001;            //Timer start 

0 Kudos
Reply
1,500 Views
JuroV
NXP Employee
NXP Employee

This code is all right from functionality point of view, nothing must be changed. I was not checking DTIM settings.

0 Kudos
Reply
1,501 Views
sven_kaemmer
Contributor III

Hi, look at the following post, perhaps it can help you.

 

 

https://community.freescale.com/message/60274#60274

0 Kudos
Reply
1,500 Views
admin
Specialist II
For utilizing my DTIM0 ISR do I modify vector.c inside bsp directory?
0 Kudos
Reply