calling INTERRUPT SERVICE ROUTINES

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

calling INTERRUPT SERVICE ROUTINES

1,026件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by unnati on Sat Mar 13 04:45:46 MST 2010
hi,

i am having problem in calling interrupt service routine.

I have defined the TIMER16B0 service routine in following way:

[SIZE=2][COLOR=#7f0055][LEFT][B][COLOR=black]void[/COLOR][/B][/COLOR][/SIZE][B][COLOR=black][SIZE=2] TIMER16_0_IRQHandler([/SIZE][SIZE=2]void[/SIZE][/COLOR][/B][SIZE=2][B][COLOR=black])[/COLOR][/B]
[B][COLOR=black]{[/COLOR][/B]
[B][COLOR=black]LPC_TMR16B0->IR=1; [/COLOR][/B][/SIZE][SIZE=2][B][COLOR=black]//CLEAR INTERRUPT FLAG[/COLOR][/B][/LEFT]
[/SIZE][SIZE=2][LEFT][B][COLOR=black][/COLOR][/B]
[B][COLOR=black]DISPLAY_DATA=c[dig_count];[/COLOR][/B]
[B][COLOR=black]dig_count++;[/COLOR][/B]
[B][COLOR=black]LPC_GPIO2->DATA = DISPLAY_DATA;[/COLOR][/B]
[/SIZE][SIZE=2][COLOR=black][B]if[/B][/COLOR][/SIZE][SIZE=2][B][COLOR=black](dig_count>3)[/COLOR][/B]
[B][COLOR=black]{[/COLOR][/B]
[B][COLOR=black]dig_count=0;[/COLOR][/B]
[B][COLOR=black]}[/COLOR][/B]
[/SIZE][SIZE=2][COLOR=black][B]return[/B][/COLOR][/SIZE][SIZE=2][B][COLOR=black];[/COLOR][/B]
[B][COLOR=black]}[/COLOR][/B][/LEFT]
[/SIZE]
also the ADC service routine is defined as follows:

[SIZE=2][B]void ADC_IRQHandler(void)[/B][/SIZE]
[SIZE=2][B]{[/B][/SIZE]
[SIZE=2][/SIZE]
[SIZE=2][B]return;[/B][/SIZE]
[SIZE=2][B]}[/B][/SIZE]

but when i do single stepping the service routine is not being called

what should i do?any special way to define and call these routines ?

Original Attachment has been moved to: 1100184_RTC_Keil.zip

0 件の賞賛
返信
2 返答(返信)

875件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by unnati on Sat Mar 13 10:17:11 MST 2010
as u said i will see to it...

but i have 1 confusion: for adc value, if Vref is 3.3V and adcinput is 1.5V then can u tell me what will be the value in ADC->DR and how should i seperate the adcvalue from it?
0 件の賞賛
返信

875件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wrighflyer on Sat Mar 13 08:01:27 MST 2010

Quote: unnati
what should i do?any special way to define and call these routines ?


Are you misunerstanding ISR's ? They get called as a result of the interrupt source being enabled and the interrupting event then occuring at which point the CPU vectors to a specific address (one per interrupt type) and by using those pre-defined names your own routine provides a strong linker reference to over-ride the weak stub routines that was aready provided.

So what are you doing to start the timer and configure it to produce interrupts as that's what's going to ultimately cause the path of execution to end up in your ISR?
[LEFT]
[/LEFT]
0 件の賞賛
返信