This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-F28379D: CAN Interrupt with SysConfig

Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: SYSCONFIG, C2000WARE

Hello,

I started to work on CAN applications.

I tried to use SysConfig for that.

I can send a message but I cannot use Interrupts. Down here what I did on SysConfig, and in my code. My coal is to generate an interrupt each time the Message 1 is sent.

1) I enabled IE1, message transfer completed or bus error

For the Global Interrupt lines, I selected  Global_INT0 and GLOBAL_INT1. 

I chose Global_INT0 even if I don't want to use this line. I don't know why, but there is a warning message if I don't choose this option:

(I didn t Enable Line 0 Interrupts)

2) I only Use Message 1 Mailbox

3) This mailbox is configured as a transmitt mailbox. I ask for a transmitt interrupt, and connect it to Line1:

4) I enabled Interrupts in the PIE:

5) In the ISR 1, I clear the Interrupt Status, the Global Interrupt Status, and acknowledge the group

But the problem is that I never enter in the ISR, although the message is correctly sent by the command

So, my questions are:

- what does the warning message mean ?

- why do I never enter in the ISR ?

- Does my code in the ISR make sense ?

Thank you to anyone who will help me !

  • So you are able to monitor the message on the bus (i.e. the frame is actually transmitted on the bus) but no interrupt is asserted? 

    Can you try can_ex3_external_transmit.c from C:\ti\c2000\C2000Ware_5_01_00_00\driverlib\f2837xd\examples\cpu1\can? I would like to see if interrupts work with that example.

  • Hello Hareesh. Thank you for helping me.

    You well understood: I am able to monitor the CAN transmission from the C200, but the programm never enter in the transmitt sub routine.

    (The C200Data is the message sent by the C2000 microcontroller)

    I already saw the example, and it helps me to code what is needed in the ISR. I could not run it on my board because I m not able to use CANA and CANB modules.

    Also, this examples does not contain any SysConfig Files.

    So, Can you just take a look at the archive I joint to this thread. I specially make it for you:

    It only contains an ISR for the transmitt of Object 1

    - Object 1 asserts Line 1 Interrupt on transmit message

    - CANB enables Line 1 and message complete Interrupt and Global Line 1

    - PIE enables Can Interrupt 1

    I have many questions:

    - the main one: why the programm never enters into the ISR ?

    - Why the programm runs although there is no declared memory for CAN in the CMD File ?

    - I don t understand how to use the CAN_getInterruptCause function. What is the interrupt register it returns ?

    - is the CAN_clearInterruptStatus function necessary in the ISR ?

    - Why SysConfig warns the user if Global Line 0 is enabled even if Line 0 is disabled ? (below)

     

    Thank you.

    Archive_TI.zip