The secondary bootloader just executes once! Press the reset button, it doesn't execute again.why?

4 posts / 0 new
Last post
wzh16622
Offline
Last seen:3 years 1 month ago
加入:2014-09-10 08:28
The secondary bootloader just executes once! Press the reset button, it doesn't execute again.why?

I do the dual image. I edit the secondary bootloader project to chose loading which image by detecting the status of one pin. When the first reset, it's OK. Then I press the reset button or re-power, it doesn't change. I add one LED to show if the secondary bootloader executes. But it works via the keil debugging. Thanks WZH.

Device:
MT_dialog
Offline
Last seen:17小时前3周
工作人员
加入:2015-06-08 11:34
Hi wzh16622,

Hi wzh16622,

我不确定what are you trying to do....You try to boot from SPI and the image doesn't boot when you press reset, what is the application note you are following to do that ?

Thanks MT_dialog

wzh16622
Offline
Last seen:3 years 1 month ago
加入:2014-09-10 08:28
Hi MT,

Hi MT,
I follow the UM-B-012 to use the dual image, and the secondary bootloader and SUOTA both work well. The secondary bootloader project chose the image via the image id of the image header. Now I want to chose the image by the status of one pin(the button). So I edit the secondary bootloader project, and it seems that it always choses the first image, no matter what the status of the pin is. It's the situation of booting from the spi flash. But when I use the keil to debug the secondary bootloader project, it can chose the image via the status of the pin. Is it clear? Thanks WZH.

wzh16622
Offline
Last seen:3 years 1 month ago
加入:2014-09-10 08:28
Hi Dear Dialog,

Hi Dear Dialog,
I want the program to execute like: secondary-bootloader -----> one of the two images. When it execute the secondary-bootloader, I want it to chose the image by the status of one pin(Originally it chose the image by the header of the image). But when I burn the secondary-bootloader to the spi flash, it always loads the first image no matter what the status of the pin. I add one LED to show if the secondary-bootloader executes, and the LED is not bright, indicates that the secondary-bootloader is not execute, but one of the two images is accually loaded(the smartphone can scan the its advertisement data). If I use the KEIL to debug the secondary-bootloader, it works fine. The LED is bright, and the secondary-bootloader can chose the image by the status of the pin. That's why?
Best Regards,
WZH