How can I insert my ISR in MQX?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How can I insert my ISR in MQX?

跳至解决方案
3,071 次查看
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 项奖励
回复
1 解答
1,492 次查看
sven_kaemmer
Contributor III

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

 

 

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

在原帖中查看解决方案

0 项奖励
回复
5 回复数
1,492 次查看
admin
Specialist II

Thanks for the support.

0 项奖励
回复
1,492 次查看
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 项奖励
回复
1,492 次查看
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 项奖励
回复
1,493 次查看
sven_kaemmer
Contributor III

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

 

 

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

0 项奖励
回复
1,492 次查看
admin
Specialist II
For utilizing my DTIM0 ISR do I modify vector.c inside bsp directory?
0 项奖励
回复