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.

TM4C123GH6PM: CAN SAMPLING POINT

Part Number: TM4C123GH6PM

How to change CAN sampling point for TM4C123GH6PM MCU.

  • you can use the CANBitTimingSet: (see TIVAWare Peripheral Driver Library)
    void CANBitTimingSet(unsigned long ulBase, tCANBitClkParms *pClkParms)
    For instance, in my case, running at 500kbps, for a distance of 100m,
    CIA DS301 standard specifies the location of sample point at 14Tq.
    So, I used:

    // bit timing parameters
    tCANBitClkParms canbusClkParms =
    {
    13, // SyncPropPhase1Seg, ( Propagation + PhaseBuffer 1) segments,
    // (13 Tq per Prop + Phase_1)
    2, // Phase Buffer 2 segment, 2 Tq; 13 + 2 + 1Tq(sync) = 16 Tq
    2, // SJW = min(4, Phase_2)
    10 // uint32_t ui32QuantumPrescaler;
    };

    ......
    ......

    CANBitTimingSet(CAN0_BASE, &canbusClkParms);

    Regards,
    Claudio