Part Number: TMS320F28386S
Other Parts Discussed in Thread: C2000WARE
The code below runs as expected with the last line (SysCtl_resetDevice) disabled. when I disconnect and reconnect the board the same code runs which I expected as I have the build config set to CPU1_LAUNCHXL_FLASH.
When I enable the last line the code runs right the first time but when I disconnect and reconnect the board another version of code runs and I do not have the serial programmer set up. From where is it running?
I am using CCS11 and C2000Ware_4_01_00_00 per dictate as the manager did not want to switch anything midstream.
Thanks,
John
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#include "driverlib.h"
#include "device.h"
#pragma RETAIN(otp_z1_data)
#pragma DATA_SECTION(otp_z1_data,"dcsm_zsel_z1");
const long otp_z1_data = 0x5AFFFF39;
#pragma RETAIN(otp_z1_data_2)
#pragma DATA_SECTION(otp_z1_data_2,"dcsm_zsel_z1_2");
const long otp_z1_data_2 = 0xFFFF0103;
void main(void)
{
Device_init();
Device_initGPIO();
GPIO_setPadConfig(DEVICE_GPIO_PIN_LED2, GPIO_PIN_TYPE_STD);
GPIO_setDirectionMode(DEVICE_GPIO_PIN_LED2, GPIO_DIR_MODE_OUT);
Interrupt_initModule();
Interrupt_initVectorTable();
EINT;
ERTM;
int i;
for(i = 0; i < 3; i++)
{
GPIO_writePin(DEVICE_GPIO_PIN_LED2, 1);
DEVICE_DELAY_US(500000);
GPIO_writePin(DEVICE_GPIO_PIN_LED2, 0);
DEVICE_DELAY_US(500000);
}
//GPIO_setPadConfig(57, GPIO_PIN_TYPE_STD);
//GPIO_setDirectionMode(57, GPIO_DIR_MODE_IN);
//i = GPIO_readPin(57);
//SysCtl_resetDevice();
}