This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LPC2377 ISR not firing

I have been trying different sample projects with interrupts, but I can not get the ISR to fire. I have tried BlinkyIRQ both in a board and the simulator, without success.

Is there a global IRQ Enable that needs to be set? I would think the examples would run correctly.

Parents
  • An interesting thing here - you seem to have taken code for a LPC21xx and use on a LPC23xx processor.

    Note that in the LPC21xx, each channel of the VIC have a control register that you use to specify which peripherial that is using this channel. The priority of the channels are hard-coded based on the channel number.

    Look closer at the datasheet for LPC23xx and you find that it instead have a register called priority. I.e. specifying the priority of the interrupt. In the LPC23xx chips, the channel have a hard-coded mapping to an interface. So channel 4 that you are using is hard-coded to handle timer0 match and capture events.

    Not sure if Keil have fixed this now, but when adding support for LPC23xx, they just duplicated lots of constants from the LPC21xx header file and failed to correctly name the priority register, incorrectly keeping the VICVectCntlXX names.

Reply
  • An interesting thing here - you seem to have taken code for a LPC21xx and use on a LPC23xx processor.

    Note that in the LPC21xx, each channel of the VIC have a control register that you use to specify which peripherial that is using this channel. The priority of the channels are hard-coded based on the channel number.

    Look closer at the datasheet for LPC23xx and you find that it instead have a register called priority. I.e. specifying the priority of the interrupt. In the LPC23xx chips, the channel have a hard-coded mapping to an interface. So channel 4 that you are using is hard-coded to handle timer0 match and capture events.

    Not sure if Keil have fixed this now, but when adding support for LPC23xx, they just duplicated lots of constants from the LPC21xx header file and failed to correctly name the priority register, incorrectly keeping the VICVectCntlXX names.

Children
  • I did see this. I am running channel 4 with Timer0, which should be correct. One anomaly is that the VICVectPriority4 = 0x00000024 uses more than the lowest nibble, which is invalid according to the data sheet. When I change this to be VICVectPriority4 = 4;, the situation does not change, still no interrupt firing. I am including LPC23xx.h and LPC2300.s as a startup file.