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.

CCS/TMS320F28388D: UART Example program (uart_ex1_echoback)

Part Number: TMS320F28388D

Tool/software: Code Composer Studio

Hi,

I have a general question related to one of the example programs 'uart_ex1_echoback'.  

I am admittedly new to 'multicore' processors so please bear with me.  I understand the 'echoback' program cannot run without having CPU1 configure the I/O ports using another one of the examples (uart_config_C28x).  Should I be thinking of this as compiling and running two separate programs?  At one point today I did have something that appeared to be close to working (I could see the micrcontroller trying to echo back characters with an oscilloscope).  

I think I am missing some fundamental setting somewhere with the compile/debug process.  For instance when I 'debug' the echoback program and I overwriting the 'uart_config' program.

If you can give me some pointers here and possibly point me to a tutorial that would be appreciated.

Bob

  • Hi Bob ,

    No issues I will try to give some insight ..

    Bob Snyder1 said:
    Should I be thinking of this as compiling and running two separate programs?

    Yes that's right they are 2 separate programs one to be run for the c28x and the other for the Cortex M4 CM.

    Bob Snyder1 said:
    If you can give me some pointers here and possibly point me to a tutorial that would be appreciated.

    As you said the pin muxing for the UART0 port needs to be done by the master CPU1. The uart_config_C28x example is used for making GPIO85 as the UART Rx pin and GPIO84 as the UART Tx pin. This would also get the clock configurations set so that the CM or cortex core runs at 125Mhz which will impact the baud calculations.

    This uart_config_C28x example needs to run on the C28x side before the uart_ex1_echoback can be run on the Cortex M or CM side .

    Regards.

  • Thank you for the feedback.  I do have everything basically working now, but I still feel like I am missing some very fundamental process/procedure for programming and debugging this system efficiently.

    Here is the sequence that is working for me:

    1) Program the Cortex M (CM)

    2) Program the C28x

    3) Run the C28x (which boots the CM)

    What I don't fully understand is why programming the CM erases the C28x (probably a check box somewhere that I'm not seeing).  In other words I can't reverse steps 1 and 2 above.  Also, when I stop both processors why can't I start them back up again?

    Thanks,

    Bob

  • hi ,

       

    Bob Snyder1 said:
    why programming the CM erases the C28x (probably a check box somewhere that I'm not seeing).

    Ideally I dont see any issue with programming the CM after C28x which is actually the right thing to do .

    Since we load the C28x , run the code to bring it out of reset and boot.

    Then load the CM .

    Can you check what are the program load settings in CCS ?  

    Bob Snyder1 said:
    Also, when I stop both processors why can't I start them back up again?

    Isn't restart button in CCS not letting the code go to start of main ?

    What issue do you see when you want to pause the 2 cores ?

    Regards.

  • hi ,

    Were you able to make some progress here ?

    Regard.

  • I have made some progress, I can certainly hit the 'pause' button within the IDE and restart the C28 but once I do that it behaves as if the C28 and CM aren't 'talking' any more.  I honestly think this is just some minor thing that I am doing wrong.  When I 'pause' am I only stopping the C28 and not the CM core?  If so, how do I put both cores in reset (in other words, how do I get back to the 'state' where the system is sitting ready to start as if I had just reprogrammed both cores?)

    Bob

  • hi,

    Bob Snyder1 said:
    When I 'pause' am I only stopping the C28 and not the CM core?

    Yes they are independent when it comes to pause. Only when we reset the C28x the CM core would also reset.

    Bob Snyder1 said:
    If so, how do I put both cores in reset (in other words, how do I get back to the 'state' where the system is sitting ready to start as if I had just reprogrammed both cores?)

    You can reset the C28x core that should suffice . You will notice the CM also resets .

    After that we will need to press restart in both cores so that we are at the start of main for both core.

    Regards.

  • Thanks, I'll 'play' with the development board a little more today.  Certainly a large part of the problem here is that I am new to microcontrollers will multiple cores.  Same goes for the IDE.

    Bob

  • Bob,

    In case you are interested, we have a series of workshops that might be helpful.  Though, we do not have a specific F28388D workshop, we do have a workshop for the F28379D (dual-core) which you can use as a reference.  All of the device workshops can be found at:

    https://training.ti.com/c2000-mcu-device-workshops

    The F28379D workshop uses the bit-field header files; however, if you are interested in the Driverlib, then see the F28004x workshop.

    I hope this helps.

    - Ken

  • Ken,

    Thank you, that is helpful.  I am clearly missing some of the 'fundamentals' related to working with multiple cores.

    Bob

  • Bob,

    When you select the F28379D workshop page, please note that this page contain the full workshop and also a link to the consolidated workshop (towards the bottom of the page).  You might want to try lab 1 in the consolidated workshop and lab 11 in the full workshop.  (Lab 11 in the full workshop is very similar to lab 4 in the consolidated workshop).

    - Ken

  • Ken,

    Thanks for the tip(s). 

    Bob