Other Parts Discussed in Thread: SYSBIOS
Hi.
I'm using System Analyzer 1.1 to debug my system(I'm using "Log_info")
When I used Timer, it runs OK. But, after I used Hardware Interrupt(from GPIO #14 and #15), whenever I tried to run System Analyzer, system terminated with messages as below
C66xx_1: Trouble Reading Memory Block at 0x849f68 on Page 0 of Length 0x2000: (Error -1060 @ 0x84A5D0) Device is not responding to the request. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 5.1.45.0)
The memory block address(0x849f68) changes, but it always points circular buffer. In the MAP file, we can see this.
00849f68 ti_uia_runtime_LoggerCircBuf_Instance_State_0_bufferArray__A
My configuration file is
//+-- Load TI packages ---------------------------------------------------------
// Load all required BIOS/XDC runtime packages
var BIOS = xdc.useModule('ti.sysbios.BIOS');
var Memory = xdc.useModule('xdc.runtime.Memory');
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
var Task = xdc.useModule('ti.sysbios.knl.Task');
var Ipc = xdc.useModule('ti.sdo.ipc.Ipc');
var Notify = xdc.useModule('ti.sdo.ipc.Notify');
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
var Diags = xdc.useModule('xdc.runtime.Diags');
var Hwi = xdc.useModule('ti.sysbios.family.c64p.Hwi');
var ECM = xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
var Settings = xdc.module('ti.sdo.ipc.family.Settings');
var memmap = Program.cpu.memoryMap;
var Timestamp = xdc.useModule('xdc.runtime.Timestamp');
var Log = xdc.useModule('xdc.runtime.Log');
// Load the CSL package
var Csl = xdc.useModule('ti.csl.Settings');
Csl.useCSLIntcLib = true;
// Load the CPPI package
var Cppi = xdc.loadPackage('ti.drv.cppi');
// Load the QMSS package
var Qmss = xdc.loadPackage('ti.drv.qmss');
// Load the BCP package
var Bcp = xdc.loadPackage('ti.drv.bcp');
// Load the FFTC package
var Fftc = xdc.loadPackage('ti.drv.fftc');
// Load the SRIO driver package
var Srio = xdc.loadPackage('ti.drv.srio');
var System = xdc.useModule('xdc.runtime.System');
var SysStd = xdc.useModule('xdc.runtime.SysStd');
System.SupportProxy = SysStd;
var Idle = xdc.useModule('ti.sysbios.knl.Idle');
Idle.addFunc('&myIdleFxn');
Startup = xdc.useModule('xdc.runtime.Startup');
Startup.firstFxns.$add('&myStartupFxn');
//+-- Create stack -------------------------------------------------------------
// Default stack size for Tasks
Task.defaultStackSize = 0x800; // 2 KB
//+-- Create heap --------------------------------------------------------------
// Create a default system heap using ti.bios.HeapMem
var heapMemParams = new HeapMem.Params;
//heapMemParams.size = 0x249F0; // 150KBytes
heapMemParams.size = 0xF42400; // 16MBytes
heapMemParams.sectionName = "systemHeap";
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
//Program.sectMap["systemHeap"] = Program.platform.dataMemory;
Program.sectMap["systemHeap"] = "DDR3_C1";
//+-- Get the list of names that the build device supports ---------------------
MultiProc.setConfig(null, ["CORE0", "CORE1"]);
//+-- Shared memory ------------------------------------------------------------
// Configure the shared memory heap for shared memory allocations required by the CPPI and QMSS Libraries
SharedRegion.translate = false;
// Need to define the shared region. The IPC modules use this to make portable pointers.
// All processors need to add this call with their base address of the shared memory region.
// If the processor cannot access the memory, do not add it.
SharedRegion.setEntryMeta(0,
{ base: 0x0C010000,
len: 0x00100000,
ownerProcId: 0,
isValid: true,
name: "sharemem",
});
// To avoid wasting shared memory for MessageQ transports
for(var i = 0; i < MultiProc.numProcessors; i++)
{
Ipc.setEntryMeta({
remoteProcId: i,
setupMessageQ: false,
});
}
// Synchronize all processors(this will be done in Ipc_start)
Ipc.procSync = Ipc.ProcSync_ALL;
//+-- Logging ------------------------------------------------------------------
var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
LoggingSetup.eventUploadMode = LoggingSetup.UploadMode_JTAGRUNMODE;
LoggingSetup.sysbiosTaskLogging = false;
LoggingSetup.sysbiosTaskLoggingRuntimeControl = false;
LoggingSetup.loadLogging = false;
LoggingSetup.loadLoggingRuntimeControl = false;
LoggingSetup.mainLoggerSize = 32768;
LoggingSetup.disableMulticoreEventCorrelation = false;
var LogSync = xdc.useModule('ti.uia.runtime.LogSync');
LogSync.enableEventCorrelationForJTAG = true;
//+-- Enable BIOS Task scheduler -----------------------------------------------
BIOS.taskEnabled = true;
//+-- Enable Event Groups here and registering of ISR for specific GEM INTC ----
ECM.eventGroupHwiNum[0] = 7;
ECM.eventGroupHwiNum[1] = 8;
ECM.eventGroupHwiNum[2] = 9;
ECM.eventGroupHwiNum[3] = 10;
And, in my source code, Hardware Interrupt was set as below
// GPIO handle
static CSL_GpioHandle hGpio;
void myIdleFxn(void)
{
if(LogSync_isSyncEventRequired()) LogSync_writeSyncPoint();
}
void isrGpio14_SubframeInt(UArg arg)
{
Semaphore_post(semSfSync);
return;
}
void isrGpio15_SuperframeInt(UArg arg)
{
return;
}
#pragma CODE_SECTION(triggerGPIOInterrupt, ".once_text");
void triggerGPIOInterrupt(void)
{
// Open CSL GPIO module 0
hGpio = CSL_GPIO_open(0);
// Set GPIO pin number 14/15 as an input
CSL_GPIO_setPinDirInput(hGpio, 14);
CSL_GPIO_setPinDirInput(hGpio, 15);
// Set interrupt detection on GPIO pin 14/15 to rising edge
CSL_GPIO_setRisingEdgeDetect(hGpio, 14);
CSL_GPIO_setRisingEdgeDetect(hGpio, 15);
// Enable GPIO per bank interrupt for bank zero
CSL_GPIO_bankInterruptEnable(hGpio, 0);
}
#pragma CODE_SECTION(createHwi, ".once_text");
void createHwi(void)
{
Hwi_Params hwiParams;
// Initialize HWI parameters
Hwi_Params_init(&hwiParams);
// Create HWI for GPIO14
hwiParams.arg = 14;
hwiParams.eventId = 88;
Hwi_create(4, (Hwi_FuncPtr)&isrGpio14_SubframeInt, &hwiParams, NULL);
// Create HWI for GPIO15
hwiParams.arg = 15;
hwiParams.eventId = 89;
Hwi_create(6, (Hwi_FuncPtr)&isrGpio15_SuperframeInt, &hwiParams, NULL);
// Enable HWI
Hwi_enable();
}
#pragma CODE_SECTION(main, ".once_text");
void main(void)
{
....
// Create HWI
createHwi();
// Trigger interrupt for the corresponding GPIO
triggerGPIOInterrupt();
// Synchronize global log timing
LogSync_writeSyncPoint();
// Start the BIOS Task scheduler
BIOS_start();
return;
}
Somebody can help?
Regards,
Hoon Lee.