I'm having a problem where whenever I read or write to any of the ADC registers the processor enters a Hard Fault (HardFault_Handler). I am using the SKEAZ1284.h register abstraction to access the ADC registers. These are the registers in question:
#define ADC_BASE (0x4003B000u)
And the ADC initialisation I'm trying to run:
ADC_SC3 = ADC_SC3_ADLPC_MASK | ADC_SC3_ADLSMP_MASK | ADC_SC3_MODE_MASK;
ADC_SC2 = 0x00;
ADC_SC1 = ADC_SC1_AIEN_MASK | ADC_SC1_ADCH_MASK;
MCU PN: S9KEAZ128AMLK, and I've attached the linker and startup files.
Cheers for any help.
Original Attachment has been moved to: system_SKEAZ1284.c.zip
Original Attachment has been moved to: startup_SKEAZ1284.S.zip
Original Attachment has been moved to: SKEAZ_flash.ld.zip