OPENLOG ARTEMIS MBEDOS HARDFAULT WHEN COMPILED FROM ARDUINO IDE

Hi,

I have a project where I would like to periodically record data at a fast rate on an Openlog Artemis. I am planning on using the fast/slow logging triggered by pin 11. Ideally, I would create a new file for each recording session and was planning on modifying the firmware to achieve this.

When I am uploading the firmware with Artemis Firmware Uploader, everything works fine. As expected, bringing pin 11 to ground switch the recording from fast to slow. However, when I am compiling the firmware form Arduino IDE, I get an MbedOS HardFault as soon as I bring pin 11 to ground. When I am not using the “Use Pin 11 to control fast/slow logging” everything appear to work fine.

I tried using various firmware (2.5.1, 2.5, 2.4) and update the bootloader with no success.

I am currently using Arduino IDE 2.0.3, with the Redboard Artemis ATP definition.

Is there anything obvious I am no doing properly here?

Here is the error code I get:

16:43:20.710 -> ++ MbedOS Fault Handler ++
16:43:20.710 -> 
16:43:20.710 -> FaultType: HardFault
16:43:20.710 -> 
16:43:20.710 -> Context:
16:43:20.710 -> R0: 1000C130
16:43:20.710 -> R1: 8
16:43:20.710 -> R2: 0
16:43:20.710 -> R3: 6F546F67
16:43:20.710 -> R4: 1000C130
16:43:20.710 -> R5: 61A80
16:43:20.744 -> R6: 0
16:43:20.744 -> R7: 10008870
16:43:20.744 -> R8: 1
16:43:20.744 -> R9: 0
16:43:20.744 -> R10: 0
16:43:20.744 -> R11: 0
16:43:20.744 -> R12: 100088A8
16:43:20.744 -> SP   : 10008860
16:43:20.744 -> LR   : 24A79
16:43:20.744 -> PC   : 37F68
16:43:20.744 -> xPSR : 1000000
16:43:20.744 -> PSP  : 100087F8
16:43:20.744 -> MSP  : 1005FF70
16:43:20.744 -> CPUID: 410FC241
16:43:20.744 -> HFSR : 40000000
16:43:20.744 -> MMFSR: 0
16:43:20.744 -> BFSR : 82
16:43:20.744 -> UFSR : 0
16:43:20.744 -> DFSR : 0
16:43:20.744 -> AFSR : 0
16:43:20.744 -> BFAR : 6F546F77
16:43:20.744 -> Mode : Thread
16:43:20.744 -> Priv : Privileged
16:43:20.744 -> Stack: PSP
16:43:20.744 -> 
16:43:20.744 -> -- MbedOS Fault Handler --
16:43:20.744 -> 
16:43:20.744 -> 
16:43:20.744 -> 
16:43:20.744 -> ++ MbedOS Error Info ++
16:43:20.744 -> Error Status: 0x80FF013D Code: 317 Module: 255
16:43:20.786 -> Error Message: Fault exception
16:43:20.786 -> Location: 0x37F68
16:43:20.786 -> Error Value: 0x10007A30
16:43:20.786 -> Current Thread: main Id: 0x10005E0C Entry: 0x49E01 StackSize: 0x1000 StackMem: 0x10007A90 SP: 0x10008860 
16:43:20.786 -> For more info, visit: https://mbed.com/s/error?error=0x80FF013D&tgt=SFE_ARTEMIS_ATP
16:43:20.786 -> -- MbedOS Error Info --

Thanks,

Baptiste

Hi Baptiste,

Please see the compilation instructions here:

https://github.com/sparkfun/OpenLog_Art … _BINARY.md

Please make sure you have updated the Apollo3 core:

https://github.com/sparkfun/OpenLog_Art … ollo3-core

https://github.com/sparkfun/OpenLog_Art … lo3-spicpp

Without those changes, I think the code does crash when going into or coming out of deep sleep (between slow logging events).

I hope this helps,

Paul