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++)
{
}
}
}