Skip to content

Commit

Permalink
STM32F1: Support M997 - Reset and begin flash (MarlinFirmware#15209)
Browse files Browse the repository at this point in the history
  • Loading branch information
reloxx13 authored and Markus Seidl committed Oct 31, 2019
1 parent 23551b0 commit feeb212
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Marlin/src/HAL/HAL_STM32F1/HAL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,4 +369,6 @@ void analogWrite(pin_t pin, int pwm_val8) {
analogWrite(uint8_t(pin), pwm_val8);
}

void flashFirmware(int16_t value) { nvic_sys_reset(); }

#endif // __STM32F1__
3 changes: 3 additions & 0 deletions Marlin/src/HAL/HAL_STM32F1/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,6 @@ void analogWrite(pin_t pin, int pwm_val8); // PWM only! mul by 257 in maple!?

#define JTAG_DISABLE() afio_cfg_debug_ports(AFIO_DEBUG_SW_ONLY)
#define JTAGSWD_DISABLE() afio_cfg_debug_ports(AFIO_DEBUG_NONE)

#define PLATFORM_M997_SUPPORT
void flashFirmware(int16_t value);

0 comments on commit feeb212

Please sign in to comment.