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.

TMS320F28379D: IPC API调用

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

c2000的驱动库中

1.请问这个API函数在调用之前是不是还要对IPC_Instance进行地址映射,库函数中没有找到这个操作?2.为什么IPC_TOTAL_NUM的值是0?3.如何使用这个API,在使用这个API之前需要哪些步骤?

  • 2.为什么IPC_TOTAL_NUM的值是0?

    它的值是4,而不是0

    1.请问这个API函数在调用之前是不是还要对IPC_Instance进行地址映射,库函数中没有找到这个操作?

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    //*****************************************************************************
    //
    //! Sends a command to the Remote core
    //!
    //! \param ipcType is the enum corresponding to the IPC instance used
    //! \param flags is the IPC flag mask for the flags to be set
    //! \param addrCorrEnable is the flag used to determine whether or not to
    //! convert the addr parameter to remote core's address space
    //! \param command is the 32-bit command value
    //! \param addr is the 32-bit address to be sent as part of command
    //! \param data is the 32-bit data to be sent as part of command
    //!
    //! Allows the caller to send a command to the remote core. A command consists
    //! of a unique command value, a 32-bit address and a 32-bit data. The function
    //! also sends the designated flags to the remote core.
    //! There may be differences in the address spaces of Local and Remote core.
    //! For example in case of F2838X device, the address spaces of C28x core and
    //! CM core are different. In case the \e addr refers to an address in the IPC
    //! MSG RAM, \e addrCorrEnable param may be used to correct the address mismatch
    //!
    //! The \e flags parameter can be any of the IPC flag values: \b IPC_FLAG0 -
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    不需要的。您直接调用该API即可

    具体使用,您可以看一下

    https://software-dl.ti.com/C2000/docs/C2000_Multicore_Development_User_Guide/examples.html#exercise-2-ipc-example 

  • 里的参数

    IPC_CPU1_L_CPU2_R是多少?
    它的值是4,而不是0

     枚举类型值默认是0的嘛,为什么是4?,如果是4的话,那么4代表的是有4个IPC实例吗?但是28379d不是只有一个IPC模块吗?

  • 枚举类型值默认是0的嘛,为什么是4?

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    typedef enum
    {
    IPC_CPU1_L_CPU2_R, //!< CPU1 - Local core, CPU2 - Remote core
    IPC_CPU1_L_CM_R, //!< CPU1 - Local core, CM - Remote core
    IPC_CPU2_L_CPU1_R, //!< CPU2 - Local core, CPU1 - Remote core
    IPC_CPU2_L_CM_R, //!< CPU2 - Local core, CM - Remote core
    IPC_TOTAL_NUM
    }IPC_Type_t;
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    4代表上面的4个选项

  • 它的值是4,而不是0

     这是ipc.h中定义的

  • 多谢您的回复,应该是我的库中的定义少了前面的几个值

  • 抱歉,之前看了28388的驱动库。在2837xD下是只有

    typedef enum
    {
    IPC_TOTAL_NUM
    }IPC_Type_t;

    确实是0,应该是库函数内没有写

    IPC_CPU1_L_CPU2_R, //!< CPU1 - Local core, CPU2 - Remote core

    IPC_CPU2_L_CPU1_R, //!< CPU2 - Local core, CPU1 - Remote core

  • 我照您说的调用这个函数,但是还是 不正确,IPC_Instance的地址核IPC的基地址不一样

  • 我把IPC_CPU1_L_CPU2_R, IPC_CPU2_L_CPU1_R加进去以后还是不正确

  • 您好,有没有相关的例程啊?

  • https://software-dl.ti.com/C2000/docs/C2000_Multicore_Development_User_Guide/examples.html#exercise-2-ipc-example 

    您可以查看C2000ware 

    C2000Ware_3_04_00_00\driverlib\f2837xd\examples\dual\ipc

    以及

    C2000Ware_3_04_00_00\driverlib\f2838x\examples\c28x_dual\ipc

  • 里面没有调用这个函数啊

  • 只是单纯的翻转gpio啊

  • 您能帮忙测试一下这个函数能正常使用吗?

  • 那您看一下28388的例程ipc_ex1_basic_c28x

    C2000Ware_3_04_00_00\driverlib\f2838x\examples\c28x_dual\ipc

  • 但是28379d和2838x的IPC_Type_t不一样的嘛

  • 设置IPCSET都设置不了,感觉地址映射不对

  • 抱歉,之前漏掉了您的回复。请问您现在问题解决了吗?

x 出现错误。请重试或与管理员联系。