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.

TMS320F28379D: CANB module strange behavior

Part Number: TMS320F28379D

Hello everyone!

I thought that the CAN modules are completely independent of each other. The documentation does not mention that they are dependent. Howewer, I found the strange behavior of the CAN_B module: If I'm working with the CAN_B module only, it does not work until I call the

void CANInit(uint32_t ui32Base)

procedure for CAN_A module.

After that I found out that the problem is in the line

HWREGH(ui32Base + CAN_O_CTL) = CAN_CTL_SWR;

of void CANInit(uint32_t ui32Base) procedure.

In other words, if this line is not called for the CAN_A module, then the CAN_B module doesn't work. But if this line is not called for the CAN_B module, then the CAN_A module works properly. CAN_A module always works properly.

The question is:

Is that proper operation of CAN_B module? Why the CAN_B module does not work until the first module has been reset with Software Reset Enable Bit (SWR)?

  • Hi Dmitry,

    According to my understanding the CAN Modules should be independent of each other. So you should not face any such issue.

    Can you tell if you are using a launchpad or a control card? Because you will need external transceivers for LaunchPad to use CANB and in control card you would need external transceiver for both CANA and CANB.

    By working and isn't working what is that you are trying to do in the example?

    Can you please answer my question so that i can help you better.

    Thanks and Regards
    Harshmeet Singh
  • Hi Harshmeet Singh,

    and thanks for reply.

    I have solved the problem. I use an external optocoupler+CAN tranceiver for CAN_A module. But I forgot to use hardware pull-up for CANTXA pin. Therefore, the CAN tranceiver had been freezing the network until the CAN_A module was initialized.