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

Multiple VIC channels for CAN on LPC23xx

The user manual for the LPC23xx series (UM10211, 29 oct 2007) says in paragraph 7.3 of the CAN chapter:

"Each Receive and Transmit interrupt request from each controller is assigned its own channel in the Vectored Interrupt Controller (VIC), and can have its own interrupt service routine. The 'other status' interrupts from all of the CAN controllers, and the Acceptance Filter LUTerr condition, are ORed into one VIC channel."

This seems to indicate that I can have five (or possibly three) ISR for CAN. Is this really true?

Chapter 7, table 7-79, only describes the VIC as having a single channel (23) for all CAN interrupts.

What makes it extra interesting is that the uVision dialog for the VIC shows 5 channels named 20 - Brown-out, Can1 Tx, Can1 Rx, Can2 Tx and Can2 Rx. This besides the CAN channel at 23.

  • All CAN Controllers Interrupts on LPC23xx are assigned to a single VIC channel 23 as described in the VIC chapter of the user manual.

    The description in the CAN chapter of the same user manual is wrong and was taken from manuals of older LPC2000 devices with multiple CAN controllers which use separate VIC channels for each controller.

    uVision also displays all 5 CAN controllers interrupts under VIC channel 23 (in the simulator and in the latest driver also in the target debugger).

  • Yes, it seems quite obvious that the user manual has an error in the CAN chapter, but exactly what is uVision displaying in the VIC dialog?

    You say all five interrupt sources are shown under channel 23. But when I look at the dialog, four of the sources (rx and tx) are shown as belonging to channIel 20 - not channel 23.

    And why do the VIC device dialog even display 5 rows for the CAN device? If all 5 interrupt sources are mapped to a single channel on the VIC, then what extra information do the 5 individual lines in the dialog show - and collected from what registers? Shouldn't the VIC dialog only show one single line, just as it does for a USART or other device that can have multiple interrupt reasons (rx, tx, error)?

  • If you look carefully at my initial replay I said that all CAN interrupts are displayed under VIC channel 23 in the simualtor and in the latest target debugger (not yet included in MDK3.15b). There was an error in older target debugger DLL which you are using (channel 20 was used).

    You are correct that all 5 rows: CAN + CAN1 (Rx & Tx) + CAN2 (Rx & Tx) show the same value.

    The reason for this is in our modular design (dynamically allocating CAN interfaces depending on the actual chip). However I don't see this as a problem, visually it might be even more readable and is consistent with the VIC concept where each interrupt assignment (one displayed row) corresponds to a peripehral.

  • It was just a confusing element. The LPC21xx has multiple channels, and one paragraph of the LPC23xx user manual suggests that the LPC23xx series also has it. The VIC chapter says it doesn't. Then the Keil dialog says it does.

    If the NXP manual had been correct, I would not have cared about the extra lines in the dialog, but as it was, the dialog suggested that Keil knew something that I could not deduce from the manuals.