XIAO MG24 Sense - Upload Fails

Hi all,

I recently received two XIAO MG24 Sense boards and have been trying to get started with them using the Arduino IDE on macOS (M1, version 15.3.2). I followed the getting started guide from the XIAO MG24 wiki:

Sketch uses 846140 bytes (53%) of program storage space. Maximum is 1572864 bytes.
Global variables use 176504 bytes (67%) of dynamic memory, leaving 85640 bytes for local variables. Maximum is 262144 bytes.
Open On-Chip Debugger 0.12.0+dev-01514-g21fa2de70 (2024-02-07-19:03)
Licensed under GNU GPL v2
debug_level: 0
efm32s2_dci_read_se_status
[efm32s2.cpu] halted due to debug-request, current mode: Thread 
xPSR: 0xf9000000 pc: 0xfffffffe msp: 0xfffffffc
** Programming Started **
** Programming Finished **
Error: [efm32s2.cpu] clearing lockup after double fault

Based on some forum and wiki reading, it appears that the board may be in a “bricked” state. I attempted to follow the unbricking procedure as outlined on the wiki (xiao_mg24_erase.sh), but it did not seem to succeed either. Here’s the output:

./xiao_mg24_erase.sh
Open On-Chip Debugger 0.12.0+dev-01514-g21fa2de70 (2024-02-07-19:03)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
efm32s2_dci_read_se_status
Info : Using CMSIS-DAPv2 interface with VID:PID=0x2886:0x0062, serial=C23A05B2
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: FW Version = 2.0.0
Info : CMSIS-DAP: Serial# = C23A05B2
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 0
Info : CMSIS-DAP: Interface ready
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x6ba02477
Info : [efm32s2.cpu] Cortex-M33 r0p4 processor detected
Info : [efm32s2.cpu] target has 8 breakpoints, 4 watchpoints
Info : [efm32s2.cpu] Examination succeed
Info : starting gdb server for efm32s2.cpu on 3333
Info : Listening on port 3333 for gdb connections
[efm32s2.cpu] halted due to debug-request, current mode: Thread
xPSR: 0xf9000000 pc: 0xfffffffe msp: 0xfffffffc
Info : detected part: MG24B220, rev 16
Info : flash size = 1536 KiB
Info : flash page size = 8192 B
Info : detected part: MG24B220, rev 16
Info : flash size = 1536 KiB
Info : flash page size = 8192 B
Error: No flash at address 0x08180000

It appears to connect and detect the chip correctly, but then fails to erase or reset the flash.

Has anyone encountered something similar? Is there a workaround or alternative method to recover the board? Or is this a hardware issue?

Thanks in advance for any help or ideas!

Cheers,

Matt

Perhaps this may be helpful.

Hello Matt,
Same issue with my Xiaomi MG24. No solution to reload the firmware. Did you receive a response to your request?
Best regards
Marc

Hi Marc,

I managed to recover it by burning the bootloader.
In the Arduino IDE → Tools/Burn Bootloader worked for me.

Cheers,
Matt

Thanks so much, Matt.
Works for me too.
That’s great.
Best regards
Marc