2024-03-23 05:58 PM
Hi All
I am working on a data logger code. It is basic at the moment.
1, set a an ISRTimmer for 1sec.
2, When ISR triggered i set DataLoggerFlag.
3, Next loop thru main() i test DataLoggerFlag, if set go to a function and read A0, A1 ports and store back into an array i have set up.
Every time i run this code it completes 5 successful loops but it always crashes on the 6th loop in the same spot reading A1.
The Fault has the same sequence. 1, call A1 read, 2, straight to HardFault_Handler. According to the stack it happens straight after the osKernalStart (see attached pic).
I was wondering if this is an ISRtimmer confilct with ADC issue? I have palyed with varying ISR timer intervals but it stops at exactly the same spot on the 6ith iteration on A1.
Any tips would be greatly appreciated
Set Up;
Portenta H7 (STMH7), VS Code using PIO