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.

TMS320C6678: unit of "c2t_delay = 0" in "nysh.spi.map" of C6678

Part Number: TMS320C6678

Hi, Keystone Support Team,

I would like to know the unit of "c2t_delay = 0" in "nysh.spi.map" of C6678.
Is it "nano seconds" or "clocks"?
My customer would like to set "c2t_delay" to "5 nano seconds".
Could you please inform how to set properly "c2t_delay" in "nysh.spi.map" of C6678?

Best regards,
Kanae

  • I've forwarded your query to the software experts. Their feedback should be posted here.

    BR
    Tsvetolin Shulev
  • c2t delay is interms of SPI clock cycles. It maps to C2T delay described in the SPIDELAY register in the SPI USer guide:
    www.ti.com/.../sprugp2a.pdf
  • Hi Rahul,
    Thank you for your reply.
    Is c2t delay in "nysh.spi.map" SPI clock cycles?

    If my customer sets "c2t_delay = 5 " in "nysh.spi.map" at SPICLK=666kHz,
    tC2TDELAY is 7.5 micro sec.

    Or

    "c2t_delay = 5 " in "nysh.spi.map" means the C2TDELAY field value in SPI Delay Register.
    If so, I checked the example fomula in the user guide; Page-3-14.
    ***********************************************
    The setup time value is calculated as follows:
    tC2TDELAY = (C2TDELAY + 2) × SPI module clock period
    Example:
    SPI module clock = 25 MHz -> SPI module clock period = 40 ns;
    C2TDELAY = 06h; then tC2TDELAY = 320 ns;
    ***********************************************

    If my customer sets "c2t_delay = 5 " in "nysh.spi.map" at SPICLK=666kHz,
    tC2TDELAY = (5 + 2) × 1.5 (SPI module clock period)=10.5 micro sec.

    Which understanding is correct?

    Best regards,
    Kanae

  • Sorry for the delayed response. for reference we provide the ROM bootloader source here:

    processors.wiki.ti.com/.../Keystone_Device_Architecture

    Here is the trace of the setting in the BootROM:

    spiCfg.c2tdelay  = p_boot_params->c2tdelay;   //configuration copied from boot parameter table.
    
           ret = hwSpiConfig (&spiCfg);
    
                      SPI_REG_SPIDELAY_SET_C2T(v, cfg->c2tdelay);
    
                                #define SPI_REG_SPIDELAY_SET_C2T(v, delay)    (v) = BOOT_SET_BITFIELD((v), delay, 31, 24)

    So it appears the value in the boot parameter table is used to set the field which means it corresponds to your second option.

    Regards,

    Rahul