Mercurial > public > ostc4
comparison BootLoader/Src/base_bootlader.c @ 872:5e027b0f7475 Evo_2_23
Added first time initialization for new bluetooth module:
The serial numbers are not defined when the electonic is connected to power for the first time. This event is used to run a initialization sequence which sets the defaults for the bluetooth modul. At the end the module may be accessed using a default name.
| author | Ideenmodellierer |
|---|---|
| date | Wed, 14 Aug 2024 14:41:04 +0200 |
| parents | 4e10a3e087a1 |
| children | f012fcd7f465 |
comparison
equal
deleted
inserted
replaced
| 870:bc6c90e20d9e | 872:5e027b0f7475 |
|---|---|
| 511 } | 511 } |
| 512 | 512 |
| 513 if((i == 0) && (callForUpdate == 0)) | 513 if((i == 0) && (callForUpdate == 0)) |
| 514 firmware_JumpTo_Application(); | 514 firmware_JumpTo_Application(); |
| 515 | 515 |
| 516 | |
| 517 | |
| 518 MX_Bluetooth_PowerOn(); | |
| 519 MX_SPI_Init(); | 516 MX_SPI_Init(); |
| 520 SDRAM_Config(); | 517 SDRAM_Config(); |
| 521 HAL_Delay(100); | 518 HAL_Delay(100); |
| 522 | 519 |
| 523 GFX_init1_no_DMA(&pLayerInvisible, 2); | 520 GFX_init1_no_DMA(&pLayerInvisible, 2); |
| 705 textVersion[ptr++] = ')'; | 702 textVersion[ptr++] = ')'; |
| 706 } | 703 } |
| 707 textVersion[ptr++] = '\020'; | 704 textVersion[ptr++] = '\020'; |
| 708 textVersion[ptr] = 0; | 705 textVersion[ptr] = 0; |
| 709 | 706 |
| 707 TIM_init(); | |
| 708 MX_UART_Init(); | |
| 709 MX_Bluetooth_PowerOn(); | |
| 710 tComm_init(); | |
| 711 | |
| 710 tInfo_button_text("Exit","","Sleep"); | 712 tInfo_button_text("Exit","","Sleep"); |
| 711 tInfo_newpage("Bootloader 240812"); | 713 tInfo_newpage("Bootloader 240812"); |
| 712 tInfo_write("start bluetooth"); | 714 tInfo_write("start bluetooth"); |
| 713 tInfo_write(""); | 715 tInfo_write(""); |
| 714 tInfo_write(textVersion); | 716 tInfo_write(textVersion); |
| 715 tInfo_write(""); | 717 if(tComm_Set_Bluetooth_Name(0) == 0xFF) |
| 716 | 718 { |
| 717 TIM_init(); | 719 tInfo_write("Init bluetooth"); |
| 718 MX_UART_Init(); | 720 tComm_StartBlueModBaseInit(); |
| 719 MX_Bluetooth_PowerOn(); | 721 } |
| 720 tComm_Set_Bluetooth_Name(0); | 722 else |
| 721 tComm_init(); | 723 { |
| 722 tComm_StartBlueModConfig(); | 724 tInfo_write(""); |
| 725 tComm_StartBlueModConfig(); | |
| 726 } | |
| 723 | 727 |
| 724 set_globalState_Base(); | 728 set_globalState_Base(); |
| 725 | 729 |
| 726 GFX_start_VSYNC_IRQ(); | 730 GFX_start_VSYNC_IRQ(); |
| 727 | 731 |
