2008-11-07 04:10 AM
Library Example: NVIC_Init causes HardFaultException
2011-05-17 03:48 AM
I built the example provided in the Firmware Library titled AnalogWatchdog (supposed to use the ADC and interrupts) from the ADC examples, and the example never gets through the NVIC_Init() function. The code is:
/* Configure and enable ADC interrupt */ NVIC_InitStructure.NVIC_IRQChannel = ADC1_2_IRQChannel; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); Does anybody get this to run correctly and successfully set a breakpoint in the interrupt routine stm32f10x_it.c:ADC1_2_IRQHandler()? The only interrupt I seem to be able to get this example to stop in is the HardFaultException() exception which is triggered when the example calls the NVIC_Init() library function. I am attempting to run this on an STM3210E-EVAL board. CC [ This message was edited by: csiusa on 13-10-2008 18:28 ]2011-05-17 03:48 AM
I am also seeing the Hard Fault Exception when calling NVIC_Init() (different application though). I think the exception is generated when the NVIC_Init function tries to access the SCB->AIRCR variable. I've only noticed this after upgrading to the latest version of the ST firmware library.
2011-05-17 03:48 AM
Finally got this going (now quite some time ago). It seems to have been that a COMPLETE build needed to be done under RIDE7. Guess using the ''make'' icon vs. rt-click, build on the project does things differently. So it was lack of familiarity with the IDE.
CC