Problem with Interrupt Handlers for ADC and WDT

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

Problem with Interrupt Handlers for ADC and WDT

1,605 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Running_Men on Wed Jan 06 02:42:36 MST 2016
Hello,

I am using the IAR Workbench to programm a LPC Expresso Board with the LPC1115 Chip.

I will measuring a voltage with the ADC. The ADC is triggert by Timer Match registers. This works fine and I can check the DONE bit. If I activate the ADC Interrupt the programm breaks down and stop by Default_Handler in cstartup.
With other Interrupt I have not this problem. The UART Interrupt is still wokring but every interrupt behind the UART Interrupt (I have testes the ADC and WDT) are not working.

It looks like the interrupt handlers in programmcode are not found from the compiler, but I don´t understand why only the ADC and WDT handlers?

Any ideas?
Labels (1)
0 Kudos
Reply
4 Replies

1,461 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Running_Men on Fri Jan 29 02:07:57 MST 2016
Problem is solved.

After Analog Pin Configuration the programm needs a break from < 1us. I add this and the Handler will be run.

I contact IAR but at the moment nobody knows why.
0 Kudos
Reply

1,461 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mysepp on Wed Jan 06 07:54:01 MST 2016
Sorry, I don't know IAR. Perhaps IAR support can help?
Have you used and do you see other "IRQHandler" in map file?
You can also look into vector table, e.g. by debugger or in hex/bin file (if used)
and look where it points to. Do other entries point to same address?
0 Kudos
Reply

1,461 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Running_Men on Wed Jan 06 07:46:49 MST 2016
In my cstartup is written:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Default interrupt handlers.
;;
        THUMB
        SECTION .text:CODE:REORDER:NOROOT(1)

        PUBWEAK NMI_Handler
        PUBWEAK HardFault_Handler
        PUBWEAK MemManage_Handler
        PUBWEAK BusFault_Handler
        PUBWEAK UsageFault_Handler
        PUBWEAK SVC_Handler
        PUBWEAK DebugMon_Handler
        PUBWEAK PendSV_Handler
        PUBWEAK SysTick_Handler
        PUBWEAK WAKE_UP0_IRQHandler
        PUBWEAK WAKE_UP1_IRQHandler
        PUBWEAK WAKE_UP2_IRQHandler
        PUBWEAK WAKE_UP3_IRQHandler
        PUBWEAK WAKE_UP4_IRQHandler
        PUBWEAK WAKE_UP5_IRQHandler
        PUBWEAK WAKE_UP6_IRQHandler
        PUBWEAK WAKE_UP7_IRQHandler
        PUBWEAK WAKE_UP8_IRQHandler
        PUBWEAK WAKE_UP9_IRQHandler
        PUBWEAK WAKE_UP10_IRQHandler
        PUBWEAK WAKE_UP11_IRQHandler
        PUBWEAK WAKE_UP12_IRQHandler
        PUBWEAK SSP1_IRQHandler
        PUBWEAK I2C0_IRQHandler
        PUBWEAK CT16B0_IRQHandler
        PUBWEAK CT16B1_IRQHandler
        PUBWEAK CT32B0_IRQHandler
        PUBWEAK CT32B1_IRQHandler
        PUBWEAK SSP0_IRQHandler
        PUBWEAK UART0_IRQHandler
        PUBWEAK ADC_IRQHandler
        PUBWEAK WDT_IRQHandler
        PUBWEAK BOD_IRQHandler
        PUBWEAK PIO3_IRQHandler
        PUBWEAK PIO2_IRQHandler
        PUBWEAK PIO1_IRQHandler
        PUBWEAK PIO0_IRQHandler

In my routine I have the same name also in in cstartup.

In the map file I don´t find the name of my interrupt. But the vector list from cstartup will link to the programm.

__aeabi_assert          0x000008ed   0x24  Code  Gb  ABIassert.o [5]
__aeabi_idiv0           0x000009c9         Code  Gb  IntDivZer.o [4]
__aeabi_uidiv           0x00000911         Code  Gb  I32DivModFast.o [4]
__aeabi_uidivmod        0x00000911         Code  Gb  I32DivModFast.o [4]
__cmain                 0x00000a69         Code  Gb  cmain.o [4]
__exit                  0x000009cd   0x14  Code  Gb  exit.o [5]
__iar_program_start     0x00000a9b         Code  Gb  cstartup_M.o [4]
__low_level_init        0x00000a83    0x4  Code  Gb  low_level_init.o [3]
__vector_table          0x00000000         Data  Gb  cstartup_M_11xx.o [1]
__vector_table_0x1c     0x0000001c         Data  Gb  cstartup_M_11xx.o [1]
_call_main              0x00000a75         Code  Gb  cmain.o [4]
_exit                   0x00000a91         Code  Gb  cexit.o [4]
_main                   0x00000a7f         Code  Gb  cmain.o [4]
abort                   0x000009bf    0xa  Code  Gb  abort.o [3]

Should it be that my vector table is to long?
0 Kudos
Reply

1,461 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mysepp on Wed Jan 06 02:59:10 MST 2016
Usually they are defined as __WEAK in startup code (*.s?). Check if you perhaps have written the name of the interrupt routine wrong.
I think, you can also look into map file for the two names.
0 Kudos
Reply