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.

TMS320F280049: DCAN module reset process

Part Number: TMS320F280049


Dear Champs,

I am asking this for our customer.

The user wants to turn on Auto-Bus-On function and resets the CAN module if it does not receive some important messages.

1) Do we have any standard CAN reset process descriptions?

2) Do we have any example code to show this reset process?

Wayne Huang

  • 1) Do we have any standard CAN reset process descriptions?

    Please see description for SWR bit in CAN_CTL Register

    2) Do we have any example code to show this reset process?

    CAN_initModule(uint32_t base) function in can.c does this for you. Specifically, HWREGH(base + CAN_O_CTL) |=  CAN_CTL_SWR;

  • Hi Wayne,

    The Initialization section under the Operating Modes in the CAN Chapter of the TRM describes how the CAN module is reset.  In all the CAN communication examples, the sequences of initializing the CAN module (CAN_initModule), setting the bit timing and defining the message objects follow the steps described in the initialization section.  There is also a module reset capability which is true for most of the peripherals, through SOFTPRES registers.  Specifically for CAN, SOFTPRES10 can be used to reset the CAN module, after which the initialization routines still have to be ran in order to properly configure the CAN.

    I think the important question to ask is why the are the important messages not received - maybe if that is understood, customer does not need to reset/re initialize the CAN module.

    Regards,

    Joseph