2014-05-19 10:07 AM
When I try to display a bit map on my LCD, the STM32F4 jumps to the hard fault handler. Because the library is in a binary format, I can't really see whats causing the fault. If I comment out the line, the hard fault doesn't happen. I am using other STemWin functions, GUI_SetColor, GUI_FillRect, GUI_SetFont, GUI_DispStringAt, and the LCD behaves exactly as I expect it to. I know that writing to a protected bank of SDRAM will cause an AHB error, and hard fault, so I've verified that the write protect bits are cleared. I'm looking for a recommendation on how to assess the root cause of the hard fault.
#stemwin-stm32f4292014-05-20 08:03 AM
I did not think that error could cause the M4 to experience a bus fault/hard fault.
Well it doesn't directly, it's more likely a side effect of the code reading an unexpectedly large/wrong number and the resultant math causing it to try and access beyond the scope of the memory.2014-05-20 09:52 AM
Second, do you know where IAR specifies the stack size.
From IAR ide: Project->options select Linker in category list Tab Config press Edit...button select Stack/Heap Sizes tab2014-05-20 11:55 AM
Thanks!
2014-07-30 07:32 AM
The second revision of my HW did have the byte enables assigned correctly, and the hard fault was an issue no more!
2014-07-30 07:54 AM
The second revision of my HW did have the byte enables assigned correctly, and the hard fault was an issue no more!
Awesome, thanks for the follow up.