Part Number:TMS320F280049
Tool/software: Code Composer Studio
Dear TI support,
I'm working with TMS320F280049 and I have problem with my code. I am using the CCS 6.2.0.00050. I try to investigate and find the root of the problem by using realtime debugging, but I can't to do it because at the process of connection to the device using XDS200USB debugger I obtain an error message:
Error connecting to the target:
(Error -1133 @ 0x0)
Device blocked debug access because it is currently executing non-debuggable code. You may retry after the device has had time to enter debuggable code, or you may cancel, disable realtime mode, and then attempt to connect.
(Emulation package 8.0.803.0)
How can i solve this problem?
The code itself is very simple and in this develop phase it only drive and read the state of two pins - GPIO28 and GPIO29. It is based on the driverlib project of programming flash (the path to the source project is TI\c2000\C2000Ware_1_00_05_00\driverlib\f28004x\examples\flash\flashapi_ex1_program_autoecc.c) and in the final phase it will program the flash memory of the device.
The code is:
// // Included Files // #include "driverlib.h" #include "device.h" // // Include Flash API include file // #include "F021_F28004x_C28x.h" // // Include Flash API example header file // #include "flash_programming_f28004x.h" // // Defines // // Length (in 16-bit words) of data buffer used for program #define WORDS_IN_FLASH_BUFFER 0xFF // // Globals // //Data Buffers used for program operation using the flash API program function #pragma DATA_SECTION(Buffer,"DataBufferSection"); uint16 Buffer[WORDS_IN_FLASH_BUFFER + 1]; uint32 *Buffer32 = (uint32 *)Buffer; // // Prototype of the functions used in this example // void Example_Error(Fapi_StatusType status); void Example_Done(void); void Example_CallFlashAPI(void); void FMSTAT_Fail(void); void InitMyGPIOs(void) { GPIO_setPadConfig(29, GPIO_PIN_TYPE_STD); GPIO_setPadConfig(28, GPIO_PIN_TYPE_STD); //pin GPIO29 bude vystupny GPIO_setDirectionMode(29, GPIO_DIR_MODE_OUT); //pin GPIO28 bude vstupny GPIO_setDirectionMode(28, GPIO_DIR_MODE_IN); } void Synchronize_with_programmer(void) { uint32 variable; uint16 i; //synchronization from device, set L GPIO_writePin(29,0); for (i = 0; i < 2; i++) { //synchronization from host, wait for H do { variable = GPIO_readPin(28); } while((variable & 0x1) < 1); // synchronization from device, set H GPIO_writePin(29,1); // synchronization from host, wait for L do { variable = GPIO_readPin(28); } while((variable & 0x1) == 0x1); //synchronization from device, set L GPIO_writePin(29,0); } } // // Main // void main(void) { // // Initialize device clock and peripherals // Copy the Flash initialization code from Flash to RAM // Copy the Flash API from Flash to RAM // Configure Flash wait-states, fall back power mode, performance features and ECC // Device_init(); // // Initialize GPIO // Device_initGPIO(); // // Initialize PIE and clear PIE registers. Disables CPU interrupts. // Interrupt_initModule(); // // Initialize the PIE vector table with pointers to the shell Interrupt // Service Routines (ISR). // Interrupt_initVectorTable(); // // Enable Global Interrupt (INTM) and realtime interrupt (DBGM) // EINT; ERTM; //set the directions of pins InitMyGPIOs(); //oscillate with pins as the start condition Synchronize_with_programmer(); // // Notice that Flash API functions are mapped to RAM for execution in this example. // In F28004x devices that have two banks, Flash API functions may be executed from // one bank to perform Flash erase and program operations on the other bank. // Flash API functions should not be executed from the same bank on which erase/ // program operations are in progress. // Also, note that there should not be any access to the Flash bank on which erase/ // program operations are in progress. Hence below function is mapped to RAM for // execution. // //Example_CallFlashAPI(); }
Any ideas where can be the problem with the realtime debugging?
Best regards,
Tomas