IWRL6432BOOST: MCSPI Settings and Operation

Part Number: IWRL6432BOOST
Other Parts Discussed in Thread: SYSCONFIG

Hi,

We are busy developing a product with the above device using the MMWAVE_L_SDK_05_03_00_02 SDK. One of the things we wish to do is use SPI0 (in peripheral mode) for inter processor communication with a host device (in controller mode). We have got the SPI bus working, but in setting it up have come across a few issues which we hope can be answered here. These are:

1). SPI communication (in MCSPI_OPER_MODE_INTERRUPT mode) doesn't work in the seperate thread when in low power mode, only normal power mode. Is there perhaps something that low power mode does that prevents the peripheral from working. Could it perhaps be related to this setting (.enableSPICSWakeupLPDS) in Power_ConfigV1?

2). In MCSPI DMA mode, we can only get this mode to work with EDMA config 0 (EDMA_APPSS_A) and not config 1 (EDMA_APPSS_B) both in our code and in the demo code in CCS. Can MCSPI be used in DMA mode using EDMA config 1 (EDMA_APPSS_B) and if so, is there perhaps an example we can look at?

3). In MCSPI DMA mode (EDMA config 0), the highest clock rate we can use for stable transfers seems to only be about 10MHz. Can we expect to achieve higher clock rates than this? Our controller device can go up to 32MHz and we see that it is doing this correctly with a logic analyser.

4). In the MCSPI settings, our code only seems to work when these MCSPI_ChConfig settings are as follows:

        .inputSelect      = MCSPI_IS_D1,
        .dpe0             = MCSPI_DPE_ENABLE,
        .dpe1             = MCSPI_DPE_DISABLE,

In the example in CCS, we can however change these to the following values and still have SPI transfers working:
        .inputSelect      = MCSPI_IS_D0,
        .dpe0             = MCSPI_DPE_DISABLE,
        .dpe1             = MCSPI_DPE_ENABLE,
All other settings in the MCSPI setup remaining the same, is there perhaps another setting somewhere else that we have missed that will enable .inputSelect = MCSPI_IS_D0 to work. Also, what exactly does this setting do? I.e. what is meant by data line 0 or 1 for reception?
We will be able to provide more information if/as required. Thank you for the response in anticipation.
  • Hi,

    Thank you for your query. Please allow us a couple of days to respond

    Regards

  • Hello.

    I am looking into this and will provide a response by end of day Monday.

    Sincerely,

    Santosh

  • Hello.

    1). SPI communication (in MCSPI_OPER_MODE_INTERRUPT mode) doesn't work in the seperate thread when in low power mode, only normal power mode. Is there perhaps something that low power mode does that prevents the peripheral from working. Could it perhaps be related to this setting (.enableSPICSWakeupLPDS) in Power_ConfigV1?

    The SPI peripheral is turned off as part of entering low power mode, but you can enable the wakeup of SPI in SysConfig.

    In MCSPI DMA mode, we can only get this mode to work with EDMA config 0 (EDMA_APPSS_A) and not config 1 (EDMA_APPSS_B) both in our code and in the demo code in CCS. Can MCSPI be used in DMA mode using EDMA config 1 (EDMA_APPSS_B) and if so, is there perhaps an example we can look at?

    As of right now, it cannot be used with EDMA config 1.

    3). In MCSPI DMA mode (EDMA config 0), the highest clock rate we can use for stable transfers seems to only be about 10MHz. Can we expect to achieve higher clock rates than this? Our controller device can go up to 32MHz and we see that it is doing this correctly with a logic analyser.

    Let me look into this further; according to the data sheet SPI should be able to support up to 40 MHz, but I will need to confirm if this includes when it is configured for DMA mode.  I will provide an update for you by the end of day tomorrow on this.

    All other settings in the MCSPI setup remaining the same, is there perhaps another setting somewhere else that we have missed that will enable .inputSelect

    In what file are you making this modification?  If it is within one of the files generated by SysConfig, changing the value in the file itself won't matter because when the project is rebuilt, those files are regenerated based on the selections made in SysConfig, which aren't changed when you manually change the source file.  That would maybe explain why you are seeing the different behavior.

    Sincerely,

    Santosh

  • Let me look into this further; according to the data sheet SPI should be able to support up to 40 MHz, but I will need to confirm if this includes when it is configured for DMA mode.  I will provide an update for you by the end of day tomorrow on this.

    SPI will work up to 25 MHz, and will require that you connect a 160 MHz clock to the SPI CLK.

    Sincerely,

    Santosh

  • Hi Santosh,

    Thank you for your feedback.

    The SPI peripheral is turned off as part of entering low power mode, but you can enable the wakeup of SPI in SysConfig.

    Could you please advise on the exact setting, if it is not .enableSPICSWakeupLPDS? This setting didn't seem to change anything for us.

    In what file are you making this modification?  If it is within one of the files generated by SysConfig, changing the value in the file itself won't matter because when the project is rebuilt, those files are regenerated based on the selections made in SysConfig, which aren't changed when you manually change the source file.  That would maybe explain why you are seeing the different behavior.

    I am making the change in CCS and then rebuilding each time, so I suspect there is another setting in CCS that I am missing that isn't set when I manually change our own code (independent of CCS). Also, what exactly do these settings do:

            .inputSelect      = MCSPI_IS_D0,
            .dpe0             = MCSPI_DPE_DISABLE,
            .dpe1             = MCSPI_DPE_ENABLE,

    Thanks and Regards,

    Alan

  • Hello Alan.

    I would recommend you make all of your changes in SysConfig as opposed to inside the source code in CCS.  Like I said earlier, every time you build, it will regenerate the peripheral settings based on the SysConfig settings as opposed to any changes you may have made in the files.  So if you want to test new changes, you need to make those changes in SysConfig and then rebuild.  You can open the sysconfig file in CCS and make these changes, but it has to be in this file if you want the change to take place.

    Sincerely,

    Santosh