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.

AM263P4: MCAN Timestamp configuration

Part Number: AM263P4

Tool/software:

Hi All,

Looking to configure the timestamp generator in the MCAN module.

Need to clear some questions:

  1. Witch clock the timestamp is using, ICLK or FCLK?
  2. What are the options in MCAN_TSCC[1-0] TSS field?

I need a 50MHz timestamp counter to be stored in the Rx messages elements, so the question is what data need to be in : 

  • counter prescaler MCAN_TSCC[19-16] TCP field
  • MCAN_TSCC[1-0] TSS field.
  • Hello Maxim,

    Glad to help clear some things up here.

    1) This is a 16-bit external CAN timestamp function with a 24-bit prescaler value (defined by TSCC.TCP[3:0]) and relies on the MCAN Host Clock or in the SoC context the MCAN0 Interface Clock (ICLK) (200 MHz default).

    2) Since you need a 50 MHz Timestamp, you will need the following settings:

    • MCAN_TSCC.TCP = 0x3 (Divider = TCP + 1) = 4 (200 MHz / 4 = 50 MHz)
    • MCAN_TSCC.TSS = 0x1 (Timestamp counter value incremented according to TCP)

    Including a screenshot from the Bosch IP MCAN Users Manual where these options are defined.

    Best Regards,

    Zackary Fleenor

  • Hello Zackary, 

    Thank you for your answer !

  • Hello Zackary,

    After coding and debugging, the MCAN generates an internal counter (when TSS = 01) of 1MHz frequency so the divider gives us a timestamp of can bit times.

    for example :

    TCP = 0, time stamp counter frequency = 1MHz.

    TCP = 1, time stamp counter frequency = 500KHz.

    TCP = 3, time stamp counter frequency = 250KHz.

  • Hello Maxim,

    Appreciate you providing your results here, so it looks like the base timestamp frequency is 1MHz. I assume you are operating the CAN bus at 1MSPS? 

    Can you set TSS to 10 and provide the same results?

    Best Regards,

    Zackary Fleenor