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.

LP-MSPM0G3507: MCAN Reception Interrupts Stop Triggering After MCAN Message Transmission

Part Number: LP-MSPM0G3507
Other Parts Discussed in Thread: ISO1044DEVM

Tool/software:

Hello,

I am working with two LP-MSPM0G3507 boards and two CAN transceivers (ISO1044DEVM), studying the MCAN protocol using examples from the MSPM0 SDK (examples > nortos > driverlib > mcan_multi_message_rx, examples > nortos > driverlib > mcan_multi_message_tx).

I successfully transmitted and received MCAN messages between the two boards using these examples.

After that, I set up one LP-MSPM0G3507 to continuously send MCAN messages, while the other LP-MSPM0G3507 was programmed to both send and receive MCAN messages. Specifically, I aimed to create a project where MCAN messages would be transmitted via MCAN interrupts, and also triggered using a switch on the LP-MSPM0G3507 board.

Initially, the LP-MSPM0G3507 receiving and transmitting MCAN messages worked fine and could successfully receive messages from the other board. However, once I attempted to send a message from the same board using the switch, the MCAN message reception stopped working.

Upon debugging, I found that after sending the MCAN message using the switch, the MCAN0_INST_IRQHandler stopped being called, and the DL_MCAN_getOpMode(MCAN0_INST) function no longer returned DL_MCAN_OPERATION_MODE_NORMAL.

I have looked into the MCAN message transmission and reception logic from the example (examples > nortos > msp_subsystems > can_to_i2c_target_bridge) and understand the basic mechanism. However, I am still unsure why the interrupts on the LP-MSPM0G3507 stop triggering when I attempt to transmit a CAN message while it is already receiving messages via MCAN interrupts.

Could you please provide some guidance or suggestions?

The source code for the LP-MSPM0G3507 handling CAN transmission and reception is included below.

- main source code

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
* Copyright (c) 2021, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

- ti_msp_dl_config.c

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
* Copyright (c) 2023, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Lastly, here are the details of my development environment:

- Development environment: CCS 12.8.1

- MSPM0 SDK version: 2.02.00.05

Thank you for your help!