Fixes #6707 (reboot issue on X9E)

This commit is contained in:
Bertrand Songis
2019-09-04 12:55:03 +02:00
parent 73ae084016
commit 995aa8708a
4 changed files with 19 additions and 7 deletions
+10
View File
@@ -75,6 +75,16 @@ void pwrInit()
void pwrOn()
{
// we keep the init of the PIN to have pwrOn as quick as possible
GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitStructure.GPIO_Pin = PWR_ON_GPIO_PIN;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
GPIO_Init(PWR_ON_GPIO, &GPIO_InitStructure);
GPIO_SetBits(PWR_ON_GPIO, PWR_ON_GPIO_PIN);
}
@@ -71,7 +71,9 @@ defined in linker script */
.type Reset_Handler, %function
Reset_Handler:
/* Copy the data segment initializers from flash to SRAM */
bl pwrResetHandler /*jump to WDT reset handler where soft power control pin is turned on as soon as possible */
/* Copy the data segment initializers from flash to SRAM */
movs r1, #0
b LoopCopyDataInit
@@ -111,8 +113,10 @@ LoopPaintMainStack:
/* Call the clock system intitialization function.*/
bl SystemInit
/* Call C++ constructors for static objects */
bl __libc_init_array
bl __libc_init_array
/* Call the application's entry point.*/
bl main
bx lr