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-Q1: Using IPC driverlib in F28379 for synchronization and communication between cores

Part Number: TMS320F28379D-Q1
Other Parts Discussed in Thread: C2000WARE

Hi,

I want to use IPC as used in the examples given in the C2000 multicore development user guide with interrupts and with possible data transfer. 

I have some questions regarding the use of IPC in F28379.

In "C2000Ware_3_04_00_00_Software\device_support\f2837xd", I saw dual-core examples where functions in  F2837xD_Ipc_Driver.c are used. From the training video, what I understand is that with the basic option, by using F2837xD_Ipc.c, IPC interrupts are not possible, and to get the maximum possible number of interrupts(=4), we need to use IPC software driver F2837xD_Ipc_Driver.c. 

Examples with this are not available in "C2000Ware_3_04_00_00_Software\driverlib\f2837xd\examples". Why is that? I don't know if I am overlooking something significant here. 

I checked examples for F2838x because it was mentioned in the multi-core guide. It was using APIs provided in the driver lib package. And I saw the doc, Driverlib_F2837x_to_F2838x_Migration_Guide.pdf in "C2000Ware_3_04_00_00_Software\device_support\f2838x\docs", which made things more confusing. In this doc, it is said that "There was no driverlib available for F2837x device in C2000ware.".

 Also, if I need to sync the two cores, the IpcSync() function is not available in the IPC software driver F2837xD_Ipc_Driver.c. Set and acknowledge functions that are part of this sync function are available separately(only in F2837xD_Ipc.c), but wait functions are not available. Are we supposed to check the status and flag register value by a user-written while loop to use with the set and acknowledge statements to make up the sync function?

I have loads of sources here, but I don't have clarity in using them right now.  I want to know why is the driverlib IPC APIs not used for F28379 like in F2838. I can see F2837xD specific IPC file in "C2000Ware_3_04_00_00_Software\driverlib\f2837xd\driverlib".

I hope this description didn't confuse anyone trying to help.  

Thanks,

Aparna

  • Hi ,

    Have assigned this query to an IPC expert who will respond to you.

    Best Regards

    Siddharth

  • Hi Aparna,

    We do not have IPC "driverlib" (HAL APIs available in the driverlib format) support available for F2837xD. But we do have set of functions available in the bitfield support for F2838xD - which includes the files F2837xD_Ipc_Driver.c, F2837xD_Ipc_Driver_Lite.c, F2837xD_Ipc_Driver_Util.c.

    The driver_lite does not use the IPC MSGRAM and hence do not support message queuing feature. Hence, you can send a command only after the previous command has been acknowledged. Hence, only one interrupt is active at a time. Whereas in case of driver.c, it includes message queuing format where you can initialize separate message queues for each of the interrupt channels.

    In fact the IPC_driver and IPC_Driver_Lite includes functions that sends a set of sample commands such as data read, data write etc between CPU1 and CPU2. It can be used as a reference for application which needs to send additional commands. The Ipc.c and utils.c is includes some of the generic functions and utility functions which can be used directly by the application. These can be used along with Driver.c/Driver_Lite.c files as well.

    We have some examples using driver,c and driver_lite.c in the folder device_support\f2837xd\examples\dual. These uses Ipc.c and YUtils.c along with Driver.c/Driver_Lite.c

    In F2838x, we developed the HAL functions in the driverlib format. This included general set of functions which can be used to send generic commands. In the Migration guide, we mentioned that the comparison table is between the F2838x driverlib APIs and the F2837xD bitfield functions. We do not have driverlib APIs for F2837xD. You can go through that section for more details.

    We have a plan to port the IPC driverlib function back to F2837x since the bitfield functions are a bit confusing.

    Hope this answers your questions.

    Regards,

    Veena

  • Hi Veena,

    Thanks for the reply.  Are you saying that the ipc.c and ipc.h files in "C2000Ware_3_04_00_00_Software\driverlib\f2837xd\driverlib" are used in the folder device_support\f2837xd\examples\dual ? And when you say "The Ipc.c and utils.c includes some of the generic functions and utility functions which can be used directly by the application. These can be used along with Driver.c/Driver_Lite.c files as well.", is this the ipc mentioned above in the driverlib folder? I don't understand how you are saying driverlib is not available for ipc in F2837 when these files are in that folder?

  • Hi Aparna,

    Sorry for the confusion. When I say IPC driver, I mean the driver files available in the driverlib folder. Let us call the files in device_support\common folders as bitfield functions.

    In fact, the ipc.c and ipc.h in the f2837x driverlib went into the release by mistake. As I mentioned earlier, we were in the process of porting the IPC driver to F2837x, and was accidentally pushed in the release. Thanks you for reporting this, I will raise a ticket to update this.

    Please do not use this file as this is untested. The examples mentioned earlier uses the bitfield functions. And on my comment on Ipc.c and Utils.c being used along with  Driver.c/Driver_Lite.c, I meant the bitfield functions

    Regards,

    Veena

  • Thanks, Veena for the clarification. This helped.

    Also, "The Ipc.c and utils.c includes some of the generic functions and utility functions which can be used directly by the application. These can be used along with Driver.c/Driver_Lite.c files as well."-So this means I can use functions from this along with the driver.c. 

    How can I get notified when this driverlib available? 

  • Hi Aparna,

    In fact the requirement for porting the IPC driver to F2837x was assigned lower priority since we already have the bitfield functions in this device. We developed the driver for F2838x differently since it needed support for 3 different cores and the bitfield functions were a bit confusing. Probably for the next release, we should be able to prioritize it. The next official C2000ware release is planned in October.

    Meanwhile you can use the bitfield functions, Or are you waiting for the IPC driverlib files for F2837x?

    Also, "The Ipc.c and utils.c includes some of the generic functions and utility functions which can be used directly by the application. These can be used along with Driver.c/Driver_Lite.c files as well."-So this means I can use functions from this along with the driver.c. 

    Yes. You can use the functions available in Ipc.c along with Driver.c/Driver_Lite.c. Be careful not to mix Driver.c  and Driver_Lite.c. If you check the examples available in device_support folder, you can find the example includes Ipc.c and Utils.c in the CCS project along with Driver.c/Driver_Lite.c.

    Regards,

    Veena

  • Okay, I am planning to use bitfield functions as of now, and when driverlib is available I will port it to that. We can use the bit field function(eg, for ipc)  in the device support folder with the driverlib functions(for other drivers) with no issues, right?Thanks

  • If you are MSGRAMs, it might cause a conflict in the linker command file. But that is only if you use the Ipc_Driver.c. There are certain sections used by this file which is mapped to MSGRAMs in the cmd file. The same is done for the IPC driverlib as well. But the name of the sections might be different in the 2 cases.

    Other than this, I dont see any issues combining these 2.

    Regards,

    Veena