[M253] Automatic Baud Rate Adjustment with CANFD

Post Reply
chhsieh3
Posts: 307
Joined: 13 Mar 2020, 09:08

03 Jan 2022, 10:24

  • Application: This sample code receives data packets on the CAN bus, uses the detection of protocol error interrupts to match the baud rate of CAN bus communication, and dynamically adjusts the baud rate of M253 CANFD.
  • BSP Version: M253 Series CMSIS BSP V3.00.003
  • Hardware: NuMaker–M253LE V1.1, ADM3050E CAN transceiver
There are two codes in this example: “CANFD_CAN_TxRx” and “CANFD_CAN_Auto_Adjust”. The “CANFD_CAN_TxRx” is an example code of CAN transceiver, which is convenient for testing “CANFD_CAN_Auto_Adjust”. The “CANFD_CAN_Auto_Adjust” dynamically adjusts the baud rate of M253 CANFD by receiving data packets on the CAN bus, and adopts protocol error detection and interruption methods until the data on the CAN bus can be received normally and the communication baud rate of the CAN bus is matched. When the communication baud rate of the CAN bus is matched, data packets will be sent to the CAN bus periodically. The detectable baud rate range in the example is 50 Kbps ~ 1 Mbps, and the interval is 50 Kbps.

You can download the sample code at https://www.nuvoton.com/resource-downlo ... 1229165406
Nuvoton

Post Reply
  • Information
  • Who is online

    Users browsing this forum: Bing [Bot] and 17 guests