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.

AWR1843: DCAN sample point configuration

Part Number: AWR1843

Hi TI members,

I  currently try to configure ''sample point'' between 75~87.5%.

However, when I try to configure sample point as 70% (parameter shown as fig.1), the actual sample point measured by instrument is 62.5% (fig.2). The "dcanBitTimeParams" comes out from API "DCANAppCalcBitTimeParams" is shown as fig.3.

My second try is to configure sample point as 85% (parameter shown as fig.4), the actual sample point measured by instrument is 75% (fig.5).  The "dcanBitTimeParams" comes out from API "DCANAppCalcBitTimeParams" is shown as fig.6.

What is the formula for sample point, isn't it ((1+timeSegment1+timeSegment2)/(1+timeSegment1))*100%?

How can I configure sample point I want, for example, 80%.

Thanks!

Sincerely,

EricHuang 

                                          fig.1                                 

                

                                         fig.2                                     

          

                                          fig.3

                                          fig.4                 

                                                        

                                            fig.5                               

                                            

                                            fig.6

  • Hi,

    Please give us some time to check with the design team

    thank you
    Cesar

  • Hi Cesar,

    Thanks for help. Hope this topic get solved ASAP!

    sincerely,

    EricHuang 

  • I have contacted the sw development team.

    Will get back to you as soon as I have an updated

    thank you

    Cesar

  • Hi,

    Here is the information I have received from the sw development team.

    Below are the calculation for the 20MHz CAN Clock.

     

    CAN clock (can_clk)=20Mhz

    time Quanta(tq)=1 / can_clk =1/20M = 50ns

     

    Eg: bit rate =500kbps

    bit time=1/500kbps=2us

    no of tq=2us/50ns=40tq.

     

    Configure TSEG1 and TSEG2 to set sampling at 80% of a bit time.

     

    (Tsync_seg+TSEG1) / (Tsync_seg+TSEG1+TSEG2) =80%

    as we calculated above: bit time = Tsync_seg+TSEG1+TSEG2=40tq

    so , (1+TSEG1)/(40)=80%

    TSEG1=32-1=31

    TSEG2 = 8

     

    Tsync_seg=1(fixed)

     

    TSEG1=31

     

    TSEG2=8

    Thank you

    Cesar

  • Hi Cesar,

    I browse the file "AWR18_16_14_68_Tech_Reference_Manual".

    The file shows (fig.1) that the valid value of TSEG1 = 1~15, TSEG2 = 0~7.

    I am confused the configuration you mentioned above was reasonable because the TSEG1 and TSEG2 both exceed the valid value.

    Moreover, the parameters I set are CAN clock = 20Mhz, baudrate = 500kbps, propagation delay = 700ns, sample point = 70% (shown as fig.2).

    How can I set sample point I want (e.g. 80%, 87.5%) under the condition CAN clock = 20Mhz, baudrate = 500kbps. 

    Is propagation delay related to sample point? If so, what is the formula or transformation between them.

    Thank you!

    Sincerely,

    EricHuang

    fig.1

                                                fig.1

                                               fig.2

  • I also configure sample point according to the method you mentioned above.

    I try three settings in total which are shown below:

    ====================Set 1====================

    baudRatePrescaler =  4;

    timeSegment1 = 7;

    timeSegment2 = 2;

    baudRatePrescalerExt = 0;

    syncJumpWidth  =  2;

    Sample point in theory (fig.1) = 80%. However, measured by instrument (CANoe) is 75%.

             fig.1: Sample point configuration in theory

                  fig.2: Configuration sample point in code

    ====================Set 2====================

    baudRatePrescaler =  2;

    timeSegment1 = 16;

    timeSegment2 = 3;

    baudRatePrescalerExt = 0;

    syncJumpWidth  =  2;

    Sample point in theory (fig.3) = 85%. However, measured by instrument (CANoe) is 87.5%.

              fig.3: Sample point configuration in theory

                 fig.4: Configuration sample point in code

    ====================Set 3====================

    baudRatePrescaler =  5;

    timeSegment1 = 6;

    timeSegment2 = 1;

    baudRatePrescalerExt = 0;

    syncJumpWidth  =  2;

    Sample point in theory (fig.5) = 87.5%. Measured by instrument (CANoe) is 87.5%.

             fig.5: Sample point configuration in theory

                fig.6: Configuration dample point in code

    ============================================

    I want to control sample point between 75~87.5%. Therefore, the safe value I desire is 80%.

    I try the way you mentioned above to configure sample point. However, the sample point that instrument measured is either 75% or 87.5%.

    I have no idea now, do I misunderstand something or is there any constraint on device?

    Thank you!

    Sincerely,

    EricHuang  

  • Hi,

    I am still working on this issue.

    Will provide you feedback as soon as possible

    thank you

    cesar