arduino / arduino/ArduinoCore-mbed
Giga R1 gets stuck on hardware/software reset, possibly in the bootloader.
- Dominant language
- C
- Stars
- 411
- Forks
- 225
- PR merge metrics
- No merged PRs in 30d
Description
Just run this very simple sketch:
```C
uint32_t ticks = 0;
uint32_t timeout = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
while (!Serial) {
}
Serial.println("HelloWorld!");
ticks = millis();
timeout = random(1500, 3000);
}
void loop() {
// put your main code here, to run repeatedly:
if (millis() - ticks >= timeout) {
NVIC_SystemReset();
}
delay(100);
}
```
Board gets stuck after one or two resets.
```
Program received signal SIGTRAP, Trace/breakpoint trap.
0x0804a25c in HAL_PWR_EnterSLEEPMode ()
(gdb) backtrace
#0 0x0804a25c in HAL_PWR_EnterSLEEPMode ()
#1 0x0804f0cc in hal_sleep ()
#2 0x080485ae in sleep_manager_sleep_auto ()
#3 0x0804842a in void mbed::internal::do_sleep_operation(mbed::internal::timed_predicate_op&) ()
#4 0x0804846e in mbed::internal::do_timed_sleep_absolute(std::chrono::time_point > >, bool (*)(void*), void*) ()
#5 0x080484ca in mbed::internal::do_timed_sleep_relative_to_acknowledged_ticks(std::chrono::duration >, bool (*)(void*), void*) ()
#6 0x08044b0e in default_idle_hook ()
#7 0x08044bf0 in rtos_idle_loop ()
#8 0x080449fa in osRtxIdleThread ()
#9 0x080440c0 in osRtxThreadFree ()
#10 0x00000000 in ?? ()
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the supplied sketch on the Giga R1 and reproduce the hang after one or two NVIC_SystemReset calls. Use the GDB backtrace as the entry point, beginning at HAL_PWR_EnterSLEEPMode and following the sleep and reset path toward the bootloader. Done means repeated hardware/software resets complete normally without getting stuck.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100