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.

DM365 DM368 SPI Interface

looking to the datasheet of the DM365, i see that the CS1 pin is muxed to SOMI at every SPI interface.

So, when using a 4 wire connection e.g. to 2 dataflashes, which are using CS,DI,DO and CLK for communication, i cannot connect the 2 flashes to the same SPI interface ... correct?

so i can only use on r/w device and one w-only device (e.g. display) on the same spi interface?

 

  • Yes, you are correct that one cannot read/write from/to two data flashes to the same SPI interface due to the CS1 pin is muxed with the SOMI at every SPI module.

    You can use one read/write device and one write-only device on the same SPI but it requires the pin mux reconfigured between when accessing between the two devices.

    I would recommend to use two SPI's to interface two flashes.

    Thanks and regards,

    Tai  

  • Another alternative is to use a GPIO for the second chip select.

    The DM365 2.6.18 kernel SPI driver supports passing in the desired GPIO in the platform data:

     

    static u8 dm365_spi1_chipselects[] = {
         DAVINCI_SPI_INTERN_CS, // Chip select 0 - internal
         32,                    // Chip select 1 - use GIO32
    };

    static struct davinci_spi_platform_data dm365_spi_pdata = {
        .version = DAVINCI_SPI_VERSION_1,
        .num_chipselect = 2,
        .chip_sel = &dm365_spi1_chipselects[0],
        .clk_name = "SPI1CLK",
    };

  • That is a very good idea - if all other 4 SPI's are used.

    Thanks for sharing it.

    -Tai Nguyen