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.

AM2431: SPI single Master using multiple Chip selects for (4) NOR Flash parts does not work

Part Number: AM2431
Other Parts Discussed in Thread: SYSCONFIG,

We are using SPI1 interface with CS0, CS1, CS2, CS3  each connected to a different SPI NOR Flash part .

Apparently the Sysconfig only allow us to configure the SPI port with multiple Chip Selects only  in  Multi-master mode.

When we configure to multi-master and when we do a transfer the SPI interface on the TI part will only allow a transfer of one frame (byte) and then the CS line deactivates. This is  a problem when communicating to NOR Flash parts since after writing the command byte you then send a piece of data or wait for the read reply of the flash part. But because the chip select deactivates after the first byte the NOR flash cant understand and it assumes it was an abort after the command.

If the Sysconfig was configured in single master mode with one Chip select line,  then the chip select works correctly by allowing the CS to stay active . So lets say we wanted to transfer 8 bytes what normally happens is the buffer is loaded the the cycle begins after we say start. The Chip select goes low and then all 8 bytes are sent and then the chip select goes high. This is not what happens when in multi-master mode and we cant configure  Sysconfig as single master with four chip selects.

We are prevented from configuring the AM2431 as single master with four chip selects, and it only allows us to configure it as Multi-master mode. In multi-master mode the Chip select becomes deactivated after each byte that is sent and then reactivates for the next byte.

  • Hi Iance,

    It sounds like a bug in the SysCfg settings for the McSPI. For the single master, you should still be able to use up to 4 CS (instead of limited to 1). I have filed a JIRA ticket for this issue (MCUSDK-7340). Thank you so much for this important feedback.

    Best regards,

    Ming

  • Please keep this ticket open until we get the JIRA ticket for this issue (MCUSDK-7340) resolved

  • This is not a bug. McSPI single master mode is for supporting the single slave device and this allows the manual CS control to keep it asserted across SPI transaction. McSPI multi master mode is to support multiple slave devices through different CS lines and this does not allow the manual CS control, depending on the data available on any channel the corresponding CS is automatically asserted, so this toggles the CS for every word.

    The Sysconfig definition is as per the McSPI IP functionality

    I think we can support multiple flashes connected to different CS lines as below -

    • Configure the McSPI in 3 pin mode (CS not toggled by McSPI IP) only other 3 lines are used/toggled by McSPI
    • Use GPIO to toggle the pin connected to CS of Flash
    • CS assertion is done by application using GPIO depending on which flash to be accessed and called across the McSPI transfer function.
    • Initiate the McSPI transaction normally using same API for any of the flash devices.