Bootloader behavior
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-13 5:43 AM
Hi,
I need some help to understand the behavior of the bootloader.
Currently I use STM32F746 but I will move to STM32F778AI next week.
I have several needs from bootloader:
- Load bootloader if there is no user application.
- Load user application on start ( if exist ).
- Jump from user application to bootloader.
- Jump from bootloader to user application.
I started working on it and 3 out of 4 issues working great...
When BOOT0 pin is 0 ( 0V ) user application load on start and I can jump to bootloader and back.
But I can't do #1 - this only works when BOOT0 is 1 ( 3.3V ).
Explanation:
I connect to bootloader and mass erase flash .
Reset STM32F746 .
Can't enter to bootloader when BOOT0 is 0 but automatically enter to bootloader when BOOT0 is 1.
Any ideas ?
Thanks!!
David
- Labels:
-
Bootloader
-
STM32F7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-13 7:20 AM
Is this your own bootloader or the built-in bootloader? If it is the built-in bootloader, I thought it was supposed to run the bootloader if there was no code loaded in FLASH (though I don't know exactly how it checks for "valid code", maybe looking for stack pointer and reset vector at 0x08000000). But looking at AN2606 that does not appear to be the case for the STM32F74xxx family. The F77xx family is different and does appear to look for "valid code" in at least some situations.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-13 7:29 AM
I should take a look and check what the current rules are, but yes it used to check from RAM addresses for the SP, and odd, non-zero, non -1 values for the PC
The BOOT pins used to directly latch the memory shadowed at zero, but this has evolved over time, where now it vectors through the ROM.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-13 11:44 PM
Thanks for help !
It is the built-in bootloader. The purpose was to check if built-in bootloader work for my needs.
I will use STM32F778AI so I will check when I get the board.
I saw in AN2606 for STM32F77xxx that there is tests that check "if the code in boot address is valid" (p.191) and "if boot address is in ram memroy ...".
Can I assume that this tests check if STM32F77xxx have valid code ? ( for example not erased )
