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.

LAUNCHXL-F28379D: SPI using CPU2 and DMA

Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: C2000WARE

Hi everyone, I am very new to CCS workspace and microcontroller programming in general my goal is that CPU2 will manage the received SPI data from a master and then transfer the data to CPU1 (I want CPU1 to only control the main system for timing reasons) so that my main system would be updated if received data from a separate master.

Any help would be really appreciated.

Regards.

Shem Amity.

  • Hi Shem Amity,

    You can use the SPI module from CPU2. But, you would still need an init code running on the CPU1 code which does the clock configuration, pin muxing, assigning the SPI ownership to CPU2. You could refer to the dual core examples available in C2000ware as reference.

    Regards,

    Veena

  • Hi veena,

    Thank you for your reply but as I have looked in the c2000ware library I have found 2 types of examples one is in the examples folder and one in the device support folder from my understanding the examples in the examples folder are using the driverlib and the examples in the device support folder use different drivers I have already started my project on the initial example project that is already on the launchpad upon first connecting it to the pc and as I have said I am very new to the CCS workspace and microcontroller programming in general and I don't really understand the difference between the two types of examples if you could help me a bit more that would be great.

    Regards,

    Shem Amity.

  • also upon loading the example in C2000Ware_4_00_00_00\device_support\f2837xd\examples\dual\dma_transfer_shared_peripheral to CCS I cannot get the cpu2 project to build I get a lot of errors first he does not recognizes IER and IFR next every function that is connected to the DMA is recognized and colored purple but still gets an error where it says it is first mentioned in the dma_init function

  • Hi Shem Amity,

    If you are new to C2000, I would recommend you start with driverlib based examples.

    There is an example which showcases how SCI is used from CPU2 side - 

    <C22000ware>\driverlib\f2837xd\examples\dual\sci

    You can refer to the CPU1 code on how SCI ownership is transferred to CPU2. Note that the pin muxing as well is done by CPU1.

    In case of DMA, the device has dedicated DMAs on both the CPU subsystems. There is no need to transfer ownership to CPU2.

    Regarding the device support example issue, I will try to reproduce the issue and get back to you.

    Regards,

    Veena

  • Apologies for the delayed response. I am unable to reproduce the issue. The project seems to build without errors to me. Can you share a snapshot of the error you are seeing.

    Regards,

    Veena

  • Hi Venna

    thank you for you efforts I am attaching my CCS window showing that CCS for some reason does not recognizes the IFR and IER registers the other errors were solved

    this one is in the cpu1 code

    this one is for cpu2 code

    thank you for your support

  • Can you try a new CCS workspace?

    I have seen similar issue before changing the workspace had resolved the issue

    Regards,

    Veena

  • Hi Venna

    Changing the workspace worked and now I don't get any errors but when I try to apply a variation of the code I get an error about not having enough memory on the card to fit the program that is odd since I have a different project with the same code and it works just fine do uou have any idea what might be the problem?

    Regards

    Shem Amity

  • Hi Shem Amity,

    It totally depends on how you have defined your linker cmd file. You can add more memory blocks for allocating the .text or .data section as per teh application requirement.

    For more details on linker cmd file ->

    https://software-dl.ti.com/ccs/esd/documents/sdto_cgt_Linker-Command-File-Primer.html

    Regards,

    Veena

  • Thank you so much Veena you can close this thread