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.

F28M36x Concerto on TMDXDOCK28M36 Experimenter’s Kit - Programming

Other Parts Discussed in Thread: CONTROLSUITE, F28M36P63C2

Hello,

I am a beginner with the new Concerto DSP platform, i have the TMDXDOCK28M36 with TMS320F28M36 Concerto controlCARD R1.1.

I am trying the examples provided in the latest controlSUITE, and i don't see any of them operating accordingly. There is also no documentation for these examples, except the comments in the source code.

So the first step was to create and setup the target configuration to XDS100v2 Emulator for F28M36P63C2. Tested connection and functional.

I've tested the original "blinky_C28" and the others "blinky_dc_c28" and "blinky_dc_m3". None of them are blinking the LED on the control PCB.

It is also a bit strange, in contradictory with some documentation of the Control Card, that the blinky example toggles the GPIO70 and is stated that LED2 should blink, but D2 on the controlcard is controlled by GPIO34.

I've also modified the original "blinky_C28" to toogle GPIO34, but it doesn't.The variable on the debug mode i see it changing, so the loop of the processor seems to run.

But the peripheral seems to be wrong mapped, or setup.

Can i please get some help to startup with this board? Maybe there is a small thing i miss out here.

Thank you in advance,

Best regards,

Ionut

See attached code:

//###########################################################################
// FILE:   blinky_c28.c
// TITLE:  Blinky Example for F28M36x.
//
// Dual Core Blinky Example.  This example demonstrates how to run a
// implement a standalone application on both cores.  Due to an errate in
// the bootROM this example may not run correctly with the debugger connected.
// To run the example, program both cores with their respective project and
// then disconnect the debugger.  Set SW3 switch 1 to the down position
// (disconnect TRSTn) as well as setting all 4 switches on SW1 to the down
// position.  Cycle power and both LEDs should begin to blink.
//
//###########################################################################
// $TI Release: F28M36x Support Library v110 $
// $Release Date: Tue Nov  6 08:49:15 CST 2012 $
//###########################################################################

#include "DSP28x_Project.h"     // Device Headerfile and Examples Include File
#include <string.h>

#define C28_FREQ    150         //CPU frequency in MHz

#ifdef _FLASH
// These are defined by the linker (see device linker command file)
extern Uint16 RamfuncsLoadStart;
extern Uint16 RamfuncsLoadSize;
extern Uint16 RamfuncsRunStart;
#endif

void main(void)
{

   unsigned long delay;
// Step 1. Initialize System Control:
// PLL, WatchDog, enable Peripheral Clocks
// This example function is found in the F28M36x_SysCtrl.c file.
    InitSysCtrl();

// Step 2. Initialize GPIO:
// This example function is found in the F28M36x_Gpio.c file and
// illustrates how to set the GPIO to it's default state.
    InitGpio(); // Skipped for this example
    EALLOW;
    GpioG1CtrlRegs.GPBDIR.bit.GPIO34 = 1;
    EDIS;
    GpioG1DataRegs.GPBDAT.bit.GPIO34 = 1;// turn off LED
// Step 3. Clear all interrupts and initialize PIE vector table:
// Disable CPU interrupts
    DINT;

#ifdef _FLASH    
// Copy time critical code and Flash setup code to RAM
// This includes the following functions: InitFlash();
// The  RamfuncsLoadStart, RamfuncsLoadEnd, and RamfuncsRunStart
// symbols are created by the linker. Refer to the device .cmd file.
   memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
   
// Call Flash Initialization to setup flash waitstates
// This function must reside in RAM
    InitFlash();       
#endif

// Initialize the PIE control registers to their default state.
// The default state is all PIE interrupts disabled and flags
// are cleared.
// This function is found in the F28M36x_PieCtrl.c file.
    InitPieCtrl();

// Disable CPU interrupts and clear all CPU interrupt flags:
    IER = 0x0000;
    IFR = 0x0000;

// Initialize the PIE vector table with pointers to the shell Interrupt
// Service Routines (ISR).
// This will populate the entire table, even if the interrupt
// is not used in this example.  This is useful for debug purposes.
// The shell ISR routines are found in F28M36x_DefaultIsr.c.
// This function is found in F28M36x_PieVect.c.
    InitPieVectTable();



// Enable global Interrupts and higher priority real-time debug events:
    EINT;  // Enable Global interrupt INTM
    ERTM;  // Enable Global realtime interrupt DBGM

// Step 6. IDLE loop. Just sit and loop forever (optional):
    for(;;)
    {
        //
        // Turn on LED
        //
        GpioG1DataRegs.GPBDAT.bit.GPIO34 = 0;
        //
        // Delay for a bit.
        //
        for(delay = 0; delay < 2000000; delay++)
        {
        }
        
        //
        // Turn off LED
        //
        GpioG1DataRegs.GPBDAT.bit.GPIO34 = 1;
        //
        // Delay for a bit.
        //
        for(delay = 0; delay < 2000000; delay++)
        {
        }
    
    
    }

}




  • Make sure you run the setup on the M3 as well (i can not recall if i had to modify this right away) this allows this will asign the pins to the C28. I recently went through all of these issue glad to see i am not the only new user pushing thorugh this. Hope this helps...

  • Hi Galen,

    Thank you for your feedback.

    To understand it clearly, what needs to be done is to make sure that the setup of the GPIO pins of both DSPs are the same? If i look in the codes of the two DSPs (M3 and C28) the setup is for different GPIOs for the blinking LED (blinky_dc_m3 and blinky_dc_c28). Shouldn't each processor drive the pins that it is setup for? When i measure i cannot notice any toggle.

    Shouldn't the examples provided just work? It is necessary to change them according to the Control Card i am using?

    Best regards,

    Ionut

  • Ionut,

    I started with the Blinky and setup files in the Control folder. I have not ran the Blinky files in the Both folder.

    In the Control folder of examples SW there is a setup program that can be loaded onto the master (m3) in the main{} you will see functions that set up the GPIO to be released (for lack of a better word) to the C28. They are:

    GPIOPinConfigureCoreSelect

    SysCtlPeripheralEnable

    There is also GPIOPadConfigSet which sets the pins as pullup or open drain.

    As far as having example code that works.... I agree but now i wonder if i learned more figuring out why nothing was working. I went through the schematic and marked it up to include the Port desgination to make modify the example code a bit quicker.

    Regards,

    Galen

  • Ionut,

    The issues that you're running into are issues that the C2000 needs to fix.  I apologize for this.  We are actively working on fixing these examples and  will update controlSUITE when the issues are resolved.  Specifically, many of the example project for the F28M36 controlCARD were ported from examples for the F28M35 controlCARD and the various GPIO configurations haven't been updated correctly.

    You are absolutely correct that the GPIO that blinks the LED in this case should be GPIO34 and not GPIO70. 

    Have you gotten your code to blink GPIO34 to work yet?  If not, I'll take a look at it (just let me know whether you're trying to have the GPIO be controlled by the C28 or the M3 side.  Let me know...


    Galen,
    Until we get the cSUITE examples updated you may run into this type of problem as well in certain examples.


    Thank you,
    Brett

  • Dear Galen,

    Thank you for your fast response and for the advices. I got the LED blink working after i realized what you meant with the setup on the M3. It's all about the host proc. here :) Success in your developments!

    Dear Brett,

    This makes sense, if you took over the examples from the  F28M35. We are dealing with a different hardware here in the F28M36. I got the LED blink operating now, but now i am facing issues with the Ethernet examples. I try to use them and again none of them is doing what is supposed to. Have you done something already for the F28M36, regarding the example "enet_lwip_m3"? If you did, i will be glad to receive some input. I did all i knew from the experience with another ARM processor with TCP/IP, changing all the network parameters IP, MAC, gateway, but still i am not able to ping the DSP --> i get "destination host unreachable"... But i suppose that it could be again the PINS used for this board which may not be the same as for the old one F28M35.

    It will be nice to get some examples that work. Do you have a timeplan for the ControlSuite update with the right examples? When should we expect good examples and better documentation? Like this we spend a lot of working hours figuring out simple things.

    Best regards,

    Ionut

  • Ionut,

    I sympathize.  Currently I would expect something in around March.  Unfortunately, I don't have access to a better date than that.

    I would recommend taking a look at the following two threads about F28M36 ethernet:
    http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/f/171/t/242054.aspx
    http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/f/171/t/242721.aspx


    Thank you,
    Brett

  • Dear Brett,

    Thank you very much for giving me the link to these threads! It seems i am going on Galen's steps :)

    I have updated the GPIO setup for Ethernet and now the example is functional.

    All the best,

    Ionut