Hi,
I am using a RAK3172 custom board. I am using the Arduinoc core
“RAKwireless RUI STM32 Boards 4.2.1”
The board was working fine. I was able to program a sketch using Arduino IDE and arduino-cli, and I was able to read console output of my sketch via from the Serial Console
Suddenly, the board seems to be dead. This is what I am currently seeing:
No program output on the Serial Monitor
Not able to program the device with Arduino IDE. I get the error “Detect baudrate fail, can not get the baudrate”
What I have tried, with no sucess:
Spamming AT+BOOT on the serial port to try and get the device in bootloader mode
Double clicking the RESET button to try and get the board into bootloader mode
My boar has a SWD header so I could try and program it via SWD, or do chip erase + full factory reset. I have a JLink programmer. But I am unsure about what firmware I should upload in order for the board to work again with Arduino.
What firmware is the Arduino core expecting?
Where can it be downloaded?
@beegee I see you are quite knowledgeable in the matter. Would you be able to provide some guidance please?
Hello,
I was able to program RAK3172-E_latest_final.hex using JLinkExe. For reference, here is the sequence of commands used:
J-Link>connect
Device "STM32WLE5CC" selected.
Connecting to target via SWD
ConfigTargetSettings() start
J-Link script: ConfigTargetSettings()
ConfigTargetSettings() end - Took 19us
InitTarget() start
SWD selected. Executing JTAG -> SWD switching sequence.
DAP initialized successfully.
InitTarget() end - Took 11.4ms
Found SW-DP with ID 0x6BA02477
DPIDR: 0x6BA02477
CoreSight SoC-400 or earlier
AP map detection skipped. Manually configured AP map found.
AP[0]: AHB-AP (IDR: Not set, ADDR: 0x00000000)
AP[1]: AHB-AP (IDR: Not set, ADDR: 0x00000000)
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
[0][0]: E000E000 CID B105E00D PID 000BB000 SCS
[0][1]: E0001000 CID B105E00D PID 003BB002 DWT
[0][2]: E0002000 CID B105E00D PID 002BB003 FPB
[0][3]: E0000000 CID B105E00D PID 003BB001 ITM
[0][4]: E0040000 CID B105900D PID 000BB9A1 TPIU
[0][6]: E0043000 CID B105900D PID 005BB906 CTI
Memory zones:
Zone: "Default" Description: Default access mode
Cortex-M4 identified.
J-Link>ls
Unknown command. '?' for help.
J-Link>loadfile /home/.../Downloads/RAK3172-E_latest_final.hex
'loadfile': Performing implicit reset & halt of MCU.
Reset type: NORMAL (https://kb.segger.com/J-Link_Reset_Strategies)
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
Downloading file [/home/.../Downloads/RAK3172-E_latest_final.hex]...
J-Link: Flash download: Bank 0 @ 0x08000000: 2 ranges affected (190464 bytes)
J-Link: Flash download: Total: 9.253s (Prepare: 0.146s, Compare: 3.005s, Erase: 2.070s, Program: 2.570s, Verify: 1.362s, Restore: 0.098s)
J-Link: Flash download: Program speed: 72 KB/s
O.K.
I can verify that the device is connecting OK with JTAG. The device responds correctly to halt or reboot commands.
But I see not RTT logs output when using JLinkRTTClient. I also don’t see any log output when connecting to the Arduino serial console. The device also doesn’t seem to connect to the Lora network.
What could I do to troubleshoot further? Would you expect to see any RTT logs or Serial port logs using the default firmware?