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.

TMS320F28388D: I CANNOT DO WHAT I NEED - a simple two CPU application

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE, MAX232

It has been TWO WEEKS of continuous frustration with the IDE. I need to do something relatively simple:

CPU1: interface to the outside world via RS232; code in FLASH, data in RAM, ability to communicate with CPU2

CPU2: get data from CPU1, run some math, return the computed values to CPU1; code in FLASH, data in RAM

If you cannot help, I am going to start talking to TI engineering directly.

So far, I AM UNIMPRESSED BY THIS BRAINDAMAGED IDE. IT MAKES ME VERY UNIMPRESSED WITH TI

Please help.

  • Hi Bandit,

    I definitely understand the frustration, Eclipse-based IDE's (like CCS) typically are a bit of a beast (overkill+unintuitive) for simple tasks, but are powerful once you get into the weeds on a project. The issue here is that when you don't want to get into the weeds, all the details get in the way, which can be frustrating.

    Now onto the question: you are correct that what you mentioned is relatively simple, but should be tackled separately (as you have outlined).

    The first issue is loading firmware to flash via RS232. You will need a transceiver of your choice for this (we don't support -15V logic directly on-chip), but once the RS232 is changed to UART logic levels, you can use SCI to perform a live firmware update (or standard firmware update if desired).

    I have reached out to our live firmware update expert to provide some resources for working with that.

    For the IPC, I've also reached out to our IPC expert who can provide some comments on that.

    Regards,

    Vince

  • Hi Bandit,

    Having CPU1 and CPU2 communicate with each other shouldn't be difficult. We have existing C2000ware example which can be modified to suit your application.

    Path: <C2000Ware>\driverlib\f2838x\examples\c28x_dual\ipc\CCS\

    Example project: ipc_ex1_basic

    Regards,

    Manoj

  • Hi Bandit, 

    There is an example available for loading firmware into Flash for F28388D via MySecureSoftware. I can send you the link to request the example via private chat. 

    Thanks, 

    Anu

  • I was not clear enough.

    I don't want to load code over the serial port to CPU1. I DO want to communicate with the CPU1 code via RS232 (or equivalent. eg I2C, etc).

    I can load code via the IDE. I'm having problems with getting the parts of the application I need, and getting the parts to load in FLASH (code) and run-time data in RAM. I know it can happen.

  • See my answer below. RS232 is ONLY for communicating with the CPU1, not loading code

  • Anu: I tried to "Accept" the request. Did not work - got "You do not have any friendship requests to review."

    However, please note my comments about RS232 only for communicating, not loading code.

  • Hi Bandit, 

    I don't want to load code over the serial port to CPU1. I DO want to communicate with the CPU1 code via RS232 (or equivalent. eg I2C, etc).

    For this, all you need is a transceiver that is able to take the Rs232 protocol and convert it to the logic levels for SCI/UART. From there, you can use any of the CM-UART or SCI examples. As long as the baud rate of the source device is able to match up with the available baud rates of the CM-UART/SCI peripherals. 

    I can load code via the IDE. I'm having problems with getting the parts of the application I need, and getting the parts to load in FLASH (code) and run-time data in RAM. I know it can happen.

    I need a little bit more help understanding this part. With respect to getting parts of the application into Flash/RAM, do you mean that you are having trouble mapping the parts of the program you need correctly in the linker command file? The linker command file can be used to specify which section of memory your program gets mapped to. If this isn't the case, please provide more details regarding the use case of the application so we can understand better what resources to give you. 

    Thanks for your patience, 

    Anu

  • I have been doing RS232 for decades. The MAX232 is a favorite chip.

    I started with the GPIO example as my hello world. I built the project from scratch several times to make sure I knew the sequence. Originally, the project had a CPU1_RAM and CPU1_FLASH (as I recollect). I also know about the _FLASH_lnk_ files and how to select them (vs the RAM_lnk files). 

    One of the confusing aspects is how CPU_RAM can handle the FLASH_lnk files. One would think the project would need a CPU_FLASH to work with the FLASH_lnk file. (I understand the FLASH_lnk file, eg flash_programming_cpu2_FLASH.cmd, is a loader configuration file that allows the linker to know the locations in your chip family. There is a corresponding RAM.cmd file.) But the project only has CPUx_RAM files. 

    What is the purpose/use of the CPUx_FLASH file if the CPUx_RAM file does everything?

    So I tried the ipc_ex2_msgqueue_c28x1 project, because that is a good starting point. Problem is: it doesn't run. Specifically, there is ZERO indication of pass/fail. (One would thing a GPIO pin would be a good indication.) 

    I tried single-stepping (CPU1) 1.c but it hung in the IPC_sync(). I figured out I also need to start (CPU2) 2.c 

    1) What is the start sequence? Do I start CPU1, then CPU2, or visa versa? Given the code, it seems like start CPU2, then CPU1, because CPU2 blocks on 

    IPC_sync(IPC_CPU2_L_CPU1_R, IPC_FLAG31);

    Can I start them at the same time? How do I do it?

    2) how do I look at the "pass" global variable in 1.c? There are no variables in the "variable" window.

    How do you "add" variables to the "variables" window? I would think it should be automatic.

    It *seems* to actually execute, because both CPU1 and CPU2 hit the while(1) at the end. However, I do not have any confidence the example actually works.

    My only possible debug methods at this point is either GPIO and wiggle pins, or add printf() (or both - I am going to be forced to add both to actually be able to debug).

    Can I open two console windows, each for the two CPUs? What is the mechanism to bind a console window to a given CPU?

    What pins are bound to the CPU UARTs, because I will need a true RS232. If I have the pins, I can level-shift to UART voltages (ya MAX232!!) and use the right adapter to a putty window on a PC. It seems I can map the pins to the internal UARTs, because breakout picture only has analog and digital GPIO pins. 

    Can you point me to the document that tells how to do it?

    (BTW, the help->cheatsheet is downright useless. How do I know where/which file to choose as the right cheatsheet?)

    The use case is simple: CPU1 is communicating to the outside world. It gets data, sends to CPU2, which munches on it, then sends the results to CPU1, which tells the outside world what the results are. This is a math-intensive application.

  • Bandit, 

    I would recommend looking through the one day workshop that C2000 provides for the F2837xD device - this material is applicable to the F2838x device as well - https://dev.ti.com/tirex/explore/node?node=AL-ahRCVFy8HkidT-bYYJA__jEBbtmC__LATEST 

    This should cover your questions about IPC, the linker command files and navigating CCS while running a project. 

    Multiple sets of pins can be used for the SCI peripheral - please refer to Chapter 36 of F2838x TRM : https://www.ti.com/lit/ug/spruii0c/spruii0c.pdf and section 6, specifically 6.5 of  the datasheet: https://www.ti.com/lit/ds/symlink/tms320f28388d.pdf?ts=1627506533376&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FTMS320F28388D for information on the pins that can be used for SCI. 

    Thanks, 

    Anu