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.

TMS320F28P650DK: MCAN and IPC Conflict, Multi-Core Data Sharing, and Access Violation

Part Number: TMS320F28P650DK

Tool/software:

Hi experts,

Our customer has encountered the following issues and has some questions:

  1. MCAN and IPC Conflict:
    When IPC is enabled, MCAN initialization fails. Does TI provide any examples that support both MCAN and IPC functionalities?

  2. Multi-Core Data Sharing:
    Since the customer needs to use MCAN, they are not using IPC functionality. For multi-core data sharing, are there any precautions they should take? In TI’s example, the following code is mentioned:

    void writeDataCPU1(void)
    {
    uint16_t index;

    //
    // Use first location to write a multiplier.
    //
    cpu1RWArray[0] = multiplier;

    for(index = 1; index < 256; index++)
    {
    cpu1RWArray[index] = index;

    //
    // The following code will attempt to write to a shared RAM assigned
    // to CPU2 and as a result will cause an access violation.
    //
    // cpu1RArray[index] = 1000 + index;
    }
    }

    The example mentions an "access violation." Will this cause the CPU or CLA to generate an exception (fault or trap) that could disrupt normal system operation?

  3. Current Multi-Core Data Sharing Approach:
    The customer’s current approach is to designate the direction of read/write operations between cores, where the data contributor writes and the data receiver reads. Aside from the issue of data not being refreshed in real-time, are there any other potential risks with this approach?

  • Hey Lawrence,

    Thanks for reaching out. To start I want to point the customer to the following document regarding multicore development with C2000 devices: C2000Tm Multicore Development User Guide — C2000Tm Multicore Development Guide

    1) What is the order in which you are initilalizing IPC and MCAN? Are you doing all this initialization with C28x_0 (Core0) as defined in the above document? I am not aware of any examples that perform both these functions, the examples are built in a very peice-wise fashion for testing/validation and are meant to be provided as building blocks for users to design together to meet system/application requirements

    2) This is in regards to the line of code commented out below it. If the line "cpu1RArray[index] = 1000 + index;" is run, it will throw an access violation since the memory is read only. Access violations result in executing the ITRAP as described in the TRM below.

    There are dedicated ACCESS_PROTECTION_REGS registers for configuration/status of access violations.

    3) This sounds like a valid approach. Any additional multi-core "gotchas" will be defined in the user guide attached above.

    Please have them review this information and we will be glad to address any follow up questions that arrise.

    Best Regards,

    Zackary Fleenor