Hello,I'm having a hard time debugging a hard fault I'm experiencing.The hard fault occurs in the handler of external interrupt. Here's it's code:extern "C" {
void EXTI2_IRQHandler(void)
{
static uint32_t last_sample_time = 0;
if (EXTI_GetITS...
I'm having a hard time tracking a source of the hard fault occuring in my program written in C++ for the STM32F405 microcontroller.I only use three sources of interrupts in this project - two timer interrupts (TIM2 overflow happening with 36kHz frequ...
I added the volatile in case compiler optimizations were messing something up, but yes, it's completely unnecessary.the static variable is only accessed within this routine, so the thread safety shouldn't be an issue in this case I think.What would b...
Thanks a lot. I know the interrupt rate is excessive, but it's unfortunately a design requirement (I have to process incoming data that comes with each external clock cycle and output the result of some calculations).Stack overflow seems unlikely, be...
ok, so I've made some further changes to my program and I get the fault at the same line as before.Here's the register dump from the trueStudio's fault analyzer:sp (MSP) 0x2001fefc
r0 0x2
r1 0xe740
r2 0x8047ec8
r3 0xff37
r12 ...
thanks to both of you, I'll post the registers as soon as the hard fault occurs again. I've changed the interrupt priorities (now the TIM3 has a higher priority than DMA), and the fault haven't happened for 24hrs of continuous operation, so it may ta...