不需要修改BIM啊,程序默认如果CRC校验对的话默认是从Application Image,也就是ImageA开始跑,如果CRC不对或者没有ImageA才会从升级程序,也就是ImageB开始。所以把ImageA的标志位改一下就好啦。
if ((crc[0] != 0xFFFF) && (crc[0] != 0x0000))
{
if (crc[0] == crc[1])
{
JumpToImageAorB = 1;
// Simulate a reset for the Application code by an absolute jump to the expected INTVEC addr.
asm("LJMP 0x4030");
HAL_SYSTEM_RESET(); // Should not get here.
}
/* This check is disruptive when an OAD process to Image-A is interrupted - this check must
* complete before the still good Image-A is run.
else if (crc[1] == 0xFFFF) // If first run of an image that was physically downloaded.*/
{
crcCheck(BIM_IMG_B_PAGE, crc);
}
/**/
}
不需要修改BIM啊,程序默认如果CRC校验对的话默认是从Application Image,也就是ImageA开始跑,如果CRC不对或者没有ImageA才会从升级程序,也就是ImageB开始。所以把ImageA的标志位改一下就好啦。
if ((crc[0] != 0xFFFF) && (crc[0] != 0x0000))
{
if (crc[0] == crc[1])
{
JumpToImageAorB = 1;
// Simulate a reset for the Application code by an absolute jump to the expected INTVEC addr.
asm("LJMP 0x4030");
HAL_SYSTEM_RESET(); // Should not get here.
}
/* This check is disruptive when an OAD process to Image-A is interrupted - this check must
* complete before the still good Image-A is run.
else if (crc[1] == 0xFFFF) // If first run of an image that was physically downloaded.*/
{
crcCheck(BIM_IMG_B_PAGE, crc);
}
/**/
}
举报