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.

Allowed SPI clock with AISgen

Hi,

I am using C6748 and AISgen for D800K008 v1.11. If I am correct maximum SPI clock was SYSCLK2 / 3, so if DSP runs at 300 MHz then maximum SPI clock is 300/2/3 = 50 MHz. Problem is that this is maximum clock allowed in AISgen, however if DSP clock is increased to 456 MHz, then SPI clock should also increase to 76 MHz. But AISgen does not allow anything above 50 MHz.

I am using SPI flash that allows clocks upto 108 MHz, therefore it would be significant decrease in boottime if 76 MHz can be used instead of 50 MHz.

Is there a way to bypass this issue somehow, it seems to be bug in AISgen logic.

Andres

EDIT: AISGen seems to be build for 300 MHz operation (there are couple of places where clock max value could be 50 MHz instead of 76 MHz), because also in PLL0 tab I am unable to use the same settings defined in LCDK gel file for 456 MHz operation.

device_PLL0(0,18,0,0,1,11,5);

device_PLL0(unsigned int CLKMODE, unsigned int PLLM, unsigned int POSTDIV,unsigned int PLLDIV1, unsigned int PLLDIV2, unsigned int PLLDIV3, unsigned int PLLDIV7 )

I cannot put them AISgen, it says that for EMAC it must be number between 1.0 and 50.0:

  • Hi Andres,

    Thanks for your post.

    I have few clarifications as below:

    1. If DSP runs at 300MHz, the max. SPI clock would be 100 or 150 MHz, but how come it is 50 MHz as you mentioned in the above post? As per SYSCLL2 /2 or /3, it should be 100 0r 150?

    2. Likewise, if DSP clock increased to 456 MHz, then the max. SPI clock would be 152 or 228 MHz, but how come it is 76 MHz. Please explain your calculation based out of SYSCLL2 /2 or /3

    Please connect a logic analyzer/scope to the SPI clock to analyze it and observed the signal curve. By this, you could trace your boot time of loading your image based out of SPI clock configuration. Please look at chapter 9 of bootloader application notes(Boot requirements,constriants and restrictions) which explains the default freq/prescalar values used by the ROM bootloader.

    Also, Please validate the appropriate aisgen configuration file to ensure for SPI boot mode. You shall calculate the SPI clock rate using the SPI module clock frequency and PRESCALE values used in AIS gen GUI tool

    Kindly refer the below E2E threads:

    http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/p/226162/796547.aspx#796547

    http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/t/33314.aspx

    Thanks & regards,

    Sivaraj K

    -------------------------------------------------------------------------------------------------------
    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------

     

  • As far as I know SPI is only clocked from SYSCLK2 which is 300MHz/2 = 150 MHz or 456MHz/2 = 228 MHz.

    C6748 SPI manual page 11 http://www.ti.com/lit/ug/sprufm4i/sprufm4i.pdf says that "The SPI clock (SPIx_CLK) is derived from the SPI module clock. The maximum clock bit rate supported is SPI module clock/3"

    Therefore max SPI could be 150MHz /3 = 50 MHz or 228MHz/3 = 76 MHz.

    Correct me if I am wrong. I would love to use 100 MHz SPI clock for reading if this is possible.

    Andres

  • Andres,

    Your calculations are correct for the max SPI clock at 300Mhz and 456Mhz but the testing of the AISGen tool only had max coverage of 50Mhz SPI clock which is why it was limited to 50 Mhz. We may be able to increase this but will need further testing before being able to enable this functionality. For the time being using the HexAIS command line utility with the INI file is the best option to enable this usecase.

    Regards,

    Rahul

  • Andres

    50 MHz is the max SPI clock supported for master mode, as per the data sheet, this is true for 1.3V operating point too (456 MHz). Please check Table 5-70 in the datasheet and let me know if you see any confusion.

    Regards

    Mukul

  • Table 5-70 seems not to be correct one, however Table 5-68 row 1 states that minimum SPI0_CLK cycle time is 20 ns, which is 50 MHz. As I can see it does not depend on DSP clock frequency.

    Andres

  • Andres

    The table in the datasheet is right. If you are running DSP at higher frequency you will need to get the SPI clock down using SPI internal divider.

    Please see the PLL calculator, it will give more visibility in to the device , CPU, peripheral clocking scheme

    http://processors.wiki.ti.com/index.php/Programming_PLL_Controllers_on_OMAP-L1x8/C674x/AM18xx

    Regard

    Mukul