# HG changeset patch # User Ideenmodellierer # Date 1744731379 -7200 # Node ID 39b25be11009f078d2c9b2282334518a0c03dace # Parent 45a2bd04b15626e40968636d350f2e6266bf40ad Jump to Bootloader: In the previous version it was hard to get into the bootloader at startup. Rootcause was a change in the timing of the loop operations which detect a key press. The countdown values have been increased to allow an easier jump to the bootloader diff -r 45a2bd04b156 -r 39b25be11009 BootLoader/Src/base_bootlader.c --- a/BootLoader/Src/base_bootlader.c Sun Mar 30 21:39:52 2025 +0200 +++ b/BootLoader/Src/base_bootlader.c Tue Apr 15 17:36:19 2025 +0200 @@ -417,7 +417,7 @@ } -int main(void) +int __attribute__((optimize("O0"))) main(void) { /* @@ -447,7 +447,7 @@ /* button press is only 40 to 50 us low */ MX_GPIO_One_Button_only_Init(); - uint32_t i = 500000; + uint32_t i = 4000000; callForUpdate = __HAL_RCC_GET_FLAG(RCC_FLAG_SFTRST); @@ -471,7 +471,7 @@ } if(i) { - i = 200000; + i = 4000000; while(!MX_GPIO_Read_The_One_Button() && i) { i--; @@ -479,30 +479,12 @@ } if(i) { - i = 200000; + i = 4000000; while(MX_GPIO_Read_The_One_Button() && i) { i--; __NOP(); } - if(i) - { - i = 200000; - while(!MX_GPIO_Read_The_One_Button() && i) - { - i--; - __NOP(); - } - if(i) - { - i = 200000; - while(MX_GPIO_Read_The_One_Button() && i) - { - i--; - __NOP(); - } - } - } } } }