Hello all,
I am struggling with problem Data Abort by reading ADC values. Actually in my project, I have configured ADC triggered by HET every 100us.
The interrupt occurs well but by reading ADC values in function on the line uint32 index = (adc == adcREG1) ? 0U : 1U;
uint32 adcGetData(adcBASE_t *adc, uint32 group, adcData_t * data)
{
uint32 i;
uint32 buf;
uint32 mode;
uint32 index = (adc == adcREG1) ? 0U : 1U;
uint32 count;
adcData_t *ptr = data;
}
I got Data Abort. I guess it's problem with HEAP because when I commented out this line, I got again the same problem with adcData_t *ptr = data;
It's my linker script
/* Linker Settings */
--stack_size=0x0800
--heap_size=0x0100
--retain="*(.intvecs)"
/*----------------------------------------------------------------------------*/
/* Memory Map */
MEMORY{
VECTORS (X) : origin=0x00000000 length=0x00000020
FLASH0 (RX) : origin=0x00000020 length=0x000FFFE0
STACKS (RW) : origin=0x08000000 length=0x00001300
RAM (RW) : origin=0x08001300 length=0x0001ED00
}
/*----------------------------------------------------------------------------*/
/* Section Configuration */
SECTIONS{
.intvecs : {} > VECTORS
.text : {} > FLASH0
.const : {} > FLASH0
.cinit : {} > FLASH0
.pinit : {} > FLASH0
.bss : {} > RAM
.data : {} > RAM
.heap : {} > RAM
.sysmem : {} > RAM
}
In my project I am using FreeRTOS, the Serial Interface works fine. The task for ADC configured with stack 4096bytes.
Do you have any idea? Thanks in advanced.