HAL_F4light: fixed 'instant reboot' modes
This commit is contained in:
parent
a3ebb5c069
commit
04dedd77d7
@ -330,6 +330,7 @@ void HAL_F4Light::lateInit() {
|
|||||||
if( (sig & ~CONSOLE_PORT_MASK) == CONSOLE_PORT_SIGNATURE) {
|
if( (sig & ~CONSOLE_PORT_MASK) == CONSOLE_PORT_SIGNATURE) {
|
||||||
if(port != (sig & CONSOLE_PORT_MASK)) { // wrong console - reboot needed
|
if(port != (sig & CONSOLE_PORT_MASK)) { // wrong console - reboot needed
|
||||||
board_set_rtc_register(CONSOLE_PORT_SIGNATURE | (port & CONSOLE_PORT_MASK), RTC_CONSOLE_REG);
|
board_set_rtc_register(CONSOLE_PORT_SIGNATURE | (port & CONSOLE_PORT_MASK), RTC_CONSOLE_REG);
|
||||||
|
board_set_rtc_register(FORCE_APP_RTC_SIGNATURE, RTC_SIGNATURE_REG); // force bootloader to not wait
|
||||||
Scheduler::_reboot(false);
|
Scheduler::_reboot(false);
|
||||||
}
|
}
|
||||||
} else { // no signature - set and check console
|
} else { // no signature - set and check console
|
||||||
@ -337,7 +338,7 @@ void HAL_F4Light::lateInit() {
|
|||||||
|
|
||||||
AP_HAL::UARTDriver** up = uarts[port];
|
AP_HAL::UARTDriver** up = uarts[port];
|
||||||
if(up && *up != console) {
|
if(up && *up != console) {
|
||||||
|
board_set_rtc_register(FORCE_APP_RTC_SIGNATURE, RTC_SIGNATURE_REG); // force bootloader to not wait
|
||||||
Scheduler::_reboot(false);
|
Scheduler::_reboot(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -358,6 +359,7 @@ void HAL_F4Light::lateInit() {
|
|||||||
if((sig & ~OVERCLOCK_SIG_MASK ) == OVERCLOCK_SIGNATURE ) { // if correct signature
|
if((sig & ~OVERCLOCK_SIG_MASK ) == OVERCLOCK_SIGNATURE ) { // if correct signature
|
||||||
board_set_rtc_register(OVERCLOCK_SIGNATURE | oc, RTC_OVERCLOCK_REG); // set required clock in any case
|
board_set_rtc_register(OVERCLOCK_SIGNATURE | oc, RTC_OVERCLOCK_REG); // set required clock in any case
|
||||||
if((sig & OVERCLOCK_SIG_MASK) != oc) { // if wrong clock
|
if((sig & OVERCLOCK_SIG_MASK) != oc) { // if wrong clock
|
||||||
|
board_set_rtc_register(FORCE_APP_RTC_SIGNATURE, RTC_SIGNATURE_REG); // force bootloader to not wait
|
||||||
Scheduler::_reboot(false); // then reboot required
|
Scheduler::_reboot(false); // then reboot required
|
||||||
}
|
}
|
||||||
} else { // no signature, write only if needed
|
} else { // no signature, write only if needed
|
||||||
@ -391,6 +393,7 @@ void HAL_F4Light::lateInit() {
|
|||||||
hal_param_helper->_usb_storage.save();
|
hal_param_helper->_usb_storage.save();
|
||||||
|
|
||||||
board_set_rtc_register(MASS_STORAGE_SIGNATURE, RTC_MASS_STORAGE_REG);
|
board_set_rtc_register(MASS_STORAGE_SIGNATURE, RTC_MASS_STORAGE_REG);
|
||||||
|
board_set_rtc_register(FORCE_APP_RTC_SIGNATURE, RTC_SIGNATURE_REG); // force bootloader to not wait
|
||||||
Scheduler::_reboot(false);
|
Scheduler::_reboot(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user