Other Parts Discussed in Thread: OMAPL138
Hi All
Background :
Using c6748 DSP of OMAPL138 with CCS4.2; BIOS 5_41_10_36; BIOSPSP 01_30_01; EDMA3_LLD_01_11_02_03.
We have implemented a SPI/EDMA driver with asynchronous call-back.
We recieve an interrupt and within the hardware isr() call GIO_submit() with a callback function.
In the callback function we SWI_post() to offset processing (since we know the callback function is still in the interrupt context) - because we are in the interrupt context we must use HWI_enter/HWI_exit macro pair. Illustrated below.........
-------------------------------------------------------------------------------------------------------------------------------------------
isr() // external HWI_6 interrupt
{
Gio_submit( x ,y ,z ,w, &spi_dma_callback)
}
spi_dma_callback() // Checked here if in interrupt context using HWI_isHWI() - we are ie PSP doesn't use dispatcher
{
HWI_enter C64_ATEMPS, C64_BTEMPS, C64_CTEMPS, 0xFFFF, 0
SWI_post(&spiTest);
HWI_exit C64_ATEMPS, C64_BTEMPS, C64_CTEMPS, 0xFFFF, 0
}
-------------------------------------------------------------------------------------------------------------------------------------------
In our build options we have
C/C++ build -> Macros - > system macros
BIOS_INCLUDE_DIR c:/bios_5_41_10_26/packages/ti\bios/include
C/C++ build ->C6000 Compiler -> Include Options
"${BIOS_INCLUDE_DIR}"
Problem :
Using #include <hwi.h> the HWI_enter word is not picked up or defined and we get the following errors
#102: "C64_ATEMPS" has already been declared in the current scope hucl_esm_dsp spiThread.c line 340 1334840845817 5774
#102: "C64_BTEMPS" has already been declared in the current scope hucl_esm_dsp spiThread.c line 340 1334840845817 5775
#102: "C64_CTEMPS" has already been declared in the current scope hucl_esm_dsp spiThread.c line 340 1334840845817 5776
#20: identifier "HWI_enter" is undefined hucl_esm_dsp spiThread.c line 325 1334840845817 5770
#20: identifier "HWI_exit" is undefined hucl_esm_dsp spiThread.c line 340 1334840845817 5773
#270: declaration may not appear after executable statement in block hucl_esm_dsp spiThread.c line 340 1334840845817 5772
#41: expected an identifier hucl_esm_dsp spiThread.c line 325 1334840845817 5771
#41: expected an identifier hucl_esm_dsp spiThread.c line 340 1334840845817 5777
The HWI_enter macro's etc are contained in assembler files "c64.h64" and "hwi.h62" but the compiler will not recognise these and if we try to include them we get multiple errors.
This must be a known issue when using asynchronous callbacks with the SPI/EDMA3 driver - is there a WIKI page detailing how to resolve this easily ? I would assume most people would attempt to get out of the interrupt context asap so CPU could actually do some processing.
Many Thanks In Advance
BR
Barry