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.

MCU-PLUS-SDK-AM273X: How to migrate my R5F working SPI code to C66x DSP side?

Part Number: MCU-PLUS-SDK-AM273X

Tool/software:

Hello support team,

I have built SPI code on r5f side based on sample code mibspi_loopback project. To provide raw data for DSP to do the further signal processing and algorithm development, I would like to migrate the SPI code from r5f to C66x side. How should I do in the CCS? And what should I pay attention during doing that?

Any comment and advice is greatly appreciated.

Best regards,

Lin

  • Hi Lin,

    There three MIBSPI examples in AM273x MCU+ SDK 09.02.00.60 at C:\ti\mcu_plus_sdk_am273x_09_02_00_60\examples\drivers\mibspi. Each example has CCS project for both R5F core (freertos and nortos) and C66x core (nortos only). You will need to port your R5F code to the C66x core.

    Best regards,

    Ming

  • Hi Ming,

    Thanks for your quick response. I will follow your instruction to do it.

    Here I have questions about file name in the sample project in the AM273x MCU+ SDK. Right now the key file I'm working on is the mibspi_loopback.c. I want to rename it to represent some meaning of our task such as controller.c. May I just simply rename it in the Project Explorer in the CCS? Do I need to rename it in some other places? How can I ensure the rename is successful and will not cause any potential issue in the SDK platform?

    Again appreciate your help and support.

    Best regards,

    Lin

  • Hi Lin,

    The right way to do the renaming of a file is in CCS project spec file: "C:\ti\mcu_plus_sdk_am273x_09_02_00_60\examples\drivers\mibspi\mibspi_loopback_dma\am273x-evm\c66ss0_nortos\ti-c6000\example.projectspec" or in the C:\ti\mcu_plus_sdk_am273x_09_02_00_60\examples\drivers\mibspi\mibspi_loopback_dma\am273x-evm\c66ss0_nortos\ti-c6000\makefile. For example: change mibspi_loopback_dma.c to the new file name

    AND

    you have to change the file name for:  C:\ti\mcu_plus_sdk_am273x_09_02_00_60\examples\drivers\mibspi\mibspi_loopback_dma\mibspi_loopback_dma.c

    Then re-import it in CCS and rebuild it OR

    Use makefile to re-build it.

    Best regards,

    Ming

  • Hi Ming,

    Thank you very much for your instruction which is new to me and is different from the other methods I searched online,

    I will try that way.

    Best regards,

    Lin

  • Hi Ming,

    Here I have questions about debugging and running the C66x project code. I have imported and built the mibspi_loopback_am273x-evm_c66ss0_nortos_ti-c6000 project code.

    In previous post you told me the procedure of debugging or running the C66x code as below.

    1. CCS --> View --> Target Configurations
    2. Right click on your manually created target configuration file and select "Launch Selected Configuration"
    3. Right click on the Cortex_R5_0, then select "Connect Target"
    4. Right click on the C66xx_DSP, then select "Connect Target"
    5. Now you can load your application code to the R5F or C66xx_DSP. CCS --> Run --> Load --> Load Program. After the program is loaded, it will stop at main().
    6. Press the F8 to run the code, or F6 to single step the code.

    Do I have to repeat above 6 steps every time after I modified and built the project code? Any step can be skipped?

    Best regards,

    Lin

  • Hi Lin,

    No. None of the steps you mentioned can be skipped. Plus you will need to do the board power cycle every time.

    Best regards,

    Ming

  • Hi Ming,

    Thanks for your confirmation. I will follow that procedure to debug and run the code.

    When I trying to modify the example.syscfg file in the C66x project, I find that there are only two RCSS_MIBSPIA/B available for C66x core. And according to the AM273x EVM User Guide the RCSS_MIBSPIA/B are routed to J1 and J11 of EVM respectively. When I check the J1 and J11, they are different from the J7. I have the correct connector adapter of J7, but I don't have an adapter for the J1 or J11.

    So what kind of adapter for J1 and J11 should I order? Could you provide me the correct link for it?

    Appreciate your help and support.

    Best regards,

    Lin

  • Hi Lin,

    I asked our HW apps team about it. They told me you should be able to find the related information in the AM273x EVM design package. TI does not provide such information.

    Also in the future, please file a new e2e thread for any new questions unrelated to the original thread. Thanks!

    Best regards,

    Ming

  • Hi Ming,

    Thanks for your message.

    At first I thought it's related to my C66x migration, so I continue asking the question here. Understood now. I have created another post for the J1 and J11 adapter.

    I checked the EVM design package, I couldn't find any related info.

    Best regards,

    Lin