How can I insert my ISR in MQX?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How can I insert my ISR in MQX?

ソリューションへジャンプ
3,070件の閲覧回数
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,491件の閲覧回数
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,491件の閲覧回数
admin
Specialist II

Thanks for the support.

0 件の賞賛
返信
1,491件の閲覧回数
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,491件の閲覧回数
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,492件の閲覧回数
sven_kaemmer
Contributor III

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

 

 

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

0 件の賞賛
返信
1,491件の閲覧回数
admin
Specialist II
For utilizing my DTIM0 ISR do I modify vector.c inside bsp directory?
0 件の賞賛
返信