Hi everyone, I’m a new comer here. I got an interrupt problem on my LogicPD experiment Kit, it would be great if someone give me a hand. Thanks in advance.
Environment:
I downloaded OMAP-L138 StarterWare, there are codes for both the ARM core and DSP core in the installation folders, some codes are shared while others are separated in two folders called “armv5” and “c674x”, I guessed “armv5” is for the ARM code and “c674x” is for the DSP core, right? I’m develop on the ARM core for now, so I pick all the shared files and “armv5” files out, and create a CCS4 project with them. I had a hard time to make them build through… By the way, this is the cmd file in the project:
------------------------------------------------------------
linker.cmd:
-stack 0x00000800
-heap 0x00000800
MEMORY
{
vec: ORIGIN = 0x11800000 LENGTH = 0x00000400
dsp_l2_ram: ORIGIN = 0x11800400 LENGTH = 0x0003FC00
shared_ram: ORIGIN = 0x80005000 LENGTH = 0x00010000
external_ram: ORIGIN = 0xC0000000 LENGTH = 0x04000000
arm_local_rom: ORIGIN = 0xFFFD0000 LENGTH = 0x00010000
arm_local_ram: ORIGIN = 0xFFFF0000 LENGTH = 0x00002000
}
SECTIONS
{
.vectors > vec
.text > shared_ram
.const > shared_ram
.bss > shared_ram
.far > shared_ram
.switch > shared_ram
.stack > shared_ram
.data > shared_ram
.cinit > shared_ram
.sysmem > shared_ram
.cio > shared_ram
}
----------------------------------------------------
Problem:
I start from the simplest one “UartEcho”, and debug the code with XDS560plus emulator. When the code runs, it can print out messages to COM1 on my PC, but when I send characters from PC to the board back, nothing happens. I put a breakpoint in the interrupt services routine, it doesn’t get hit.
Some Research:
When I check the code in StarterWare, I didn’t find the interrupt file “vectors.asm” for ARM core. (there is one for DSP core). Instead it defines a function pointer array to obtain the ISR addresses dynamically at runtime:
static void (*fnRAMVectors[NUM_INTERRUPTS])(void);
and assign the ISR Table Address to VBR :
HWREG(SOC_AINTC_0_REGS + AINTC_VBR) = (unsigned int)fnRAMVectors;
On client side, it do some interrupt initialize and register the ISR:
/* Initialize the ARM Interrupt Controller(AINTC). */
IntAINTCInit();
/* Enable IRQ in CPSR.*/
IntMasterIRQEnable();
/* Enable the interrupts in GER of AINTC.*/
IntGlobalEnable();
/* Enable the interrupts in HIER of AINTC.*/
IntIRQEnable();
/* Registers the UARTIsr in the Interrupt Vector Table of AINTC. */
IntRegister(SYS_INT_UARTINT2, UARTIsr);
/* Map the channel number 2 of AINTC to UART2 system interrupt. */
IntChannelSet(SYS_INT_UARTINT2, 2);
IntSystemEnable(SYS_INT_UARTINT2);
Quesiont:
So what should the problem be? Isn’t a vector.asm necessary?
Thanks again for reading all of this; I’m look forward to your replay.