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.

issue about setting of DM368 spi setup time and hold time

Hi all:

     We are use DM368 spi2 to communicate with one MCU,  base on the IPNC 3.1 RDK , when short connect  SPI2_SOMI and SPI2_SIMO pins, then run the spi test tool, it works ok.

     But Waveform in osciloscope looks there is no setup time and hold time,  we have set CSHOLD = 0,  timer_disable = 0,   and add "iowrite32(0 | (8<< 24) | (8 << 16), davinci_spi->base + SPIDELAY);" in the   "dvsdk_ipnctools\ipnc_psp_2_10_00_14\ti-davinci\drivers\spi\davinci_spi_master.c"  file. 

     why the  tC2TDELAY and tT2CDELAY are 0 on the waveform?  we have read the driver code and spi datasheet for long time,  but still can not fix the problem!!!

thanks

REGARDS

Steven

  • Moving to DM3x DaVinci Video Processor Forum.

    BR
    Tsvetolin Shulev
  • Hi Steven,

    Could you check the value of 'davinci_spi->base'? Is it corresponds to SPI0 base address but you trying to configure SPIDELAY of SPI2 interface.

    BR
    Tsvetolin Shulev
  • Hi Shulev:

        Thanks for your reply, 'davinci_spi->base' is point to 0x01C6 7800, this is correct.

        I found if I add debug code :

           for(i=0; i<101; i=i+4) {
                ret = ioread32(davinci_spi->base + i);
                printk("*********reg %x = %x   *********\n", i, ret);
                udelay(100);
           }      

          on top of the "ret = spi_bitbang_start(&davinci_spi->bitbang);" in the  "static int davinci_spi_probe(struct device *d)", 

     the read value of SPIDELAY is 0("*********reg 48= 0   ********* ).  it is so strange.

    BR

    Steven