Tool/software: Code Composer Studio
Hi!
Based on the example launchxl_ex1_f280049c_demo, a diode flashing program has been made. It works both on the launcher and on my developed board. But after recording via flash, the program does not start independently when the power is turned on. Runs only through the programmer.
I found that everything starts to work when I put my finger on the chip in the area of pin track 62 (GPIO9)
Code:
#include <stdint.h>
#include <stdio.h>
#include "F28x_Project.h"
const bool DebugBoard=false;
void main()
{
InitSysCtrl();
DINT;//Clear all interrupts
InitPieCtrl();//Initialize PIE
IER = 0x0000;//Disable CPU interrupts
IFR = 0x0000;//Clear all CPU interrupt flags
InitPieVectTable();
EALLOW;
GpioCtrlRegs.GPADIR.bit.GPIO12 = 1;
GpioDataRegs.GPADAT.bit.GPIO12 = 0;
GpioCtrlRegs.GPADIR.bit.GPIO13 = 1;
GpioDataRegs.GPADAT.bit.GPIO13 = 1;
if (DebugBoard)
{
GpioCtrlRegs.GPBDIR.bit.GPIO34 = 1;
GpioDataRegs.GPBDAT.bit.GPIO34 = 1;
}
EDIS;
EINT;//Enable Global interrupt INTM
ERTM;//Enable Global realtime interrupt DBGM
DELAY_US(1000);
//Leds
while(1)
{
GpioDataRegs.GPATOGGLE.bit.GPIO12 = 1;
GpioDataRegs.GPATOGGLE.bit.GPIO13 = 1;
if (DebugBoard)
{
GpioDataRegs.GPBTOGGLE.bit.GPIO34 = 1;
}
DELAY_US(100000);
}
}