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.

AM2634-Q1: CS change by SPI module without Software Control

Part Number: AM2634-Q1


Hi,

 

I’ve received a question about switching between active and inactive CS of SPI communication from my customer. Could you answer their question below ?

In the SDK, there is a way to switch CS using software control with the MCSPI_writeChConfReg function.

Is there another way without software control to switch CS by the SPI module by synchronizing with SPI transmission ?

 

Thanks and regards,

Hideaki

  • Hi Hideaki-san,

    In theory, it is possible to switch the CS by writing to CHxCONF (FORCE bit). The current MCU+ SDK is using the CPU to write the CHxCONF, but you can use the EDMA to write to the CHxCONF, that EDMA can be triggered by a SPI transmission event.

    However, we have never tried it before, customer have to try it by themselves.

    Best regards,

    Ming  

  • Hi Ming,

    Thank you for your suggestion. They want to swith Active/Inactive CS without EDMA.

    They found the following description in the Chapter 13.1.3.2.1 in the TRM.

    "Assertion of the SPIEN[i] signals is programmable and can be done manually or automatically."

    Could you tell them how to do it automatically ?

    Thanks and regards,

    Hideaki

  • Hello Hideaki-san,

    Ming is out of office, I will try and look into this in his place but will need until Thursday until I can do so.

    Best Regards,

    Ralph Jacobi

  • Hi Ralph,

    Thank you for your reply and following up this thread. OK, I'm waiting for your update.

    Thanks and regards,

    Hideaki

  • Hello Hideaki-san,

    Thank you for the patience here, I was able to review the TRM and RA sections in detail today.

    From what I can see, the device is in automatic mode in all cases except when it is in Single-Channel Controller mode and the FORCE bit (MCSPI_CHCONF_x[20]) is set.

    For example, the programming guide Common Transfer Sequence indicates that the MCSPI can be configured for different modes including "SPIEN[i] lines assertion/deassertion: automatic, manual"

    The configuration itself is handled in MCSPI_CHCONF_x.

    And for that register, only the FORCE bit has anything to do with automatic vs manual control of the SPIEN lines: "Manual SPIEN assertion to keep SPIEN active between SPI words [single channel controller[sic] mode only]"

    Best Regards,

    Ralph Jacobi