Progrem flash for MPC5748G

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Progrem flash for MPC5748G

跳至解决方案
2,638 次查看
gj3526
Contributor III

Hi all:

    I'm designing a BootLoader that needs to progrem SREC files to flash, but there's a part of the SREC file as follow. if progrem eight words once,it will break as follow when data is not in one flash page.if progrem one word by one word ,when program next eight  words, it will auto change one word which just has progremd.how can I deal with it.

the srec file:

S3150100737C006A006A006A0014001500160054000A1F

program eight words

0x0100737C  006A006A FFFFFFFF FFFFFFFF FFFFFFFF//after program 006A006A it will break

program one words

0x0100737C  006A006A 006A0014 00150016 00000000 /// when program 0x0100738C  it will be set to 00000000

sdk code:

            for (sourceIndex = 0U; sourceIndex < temp; sourceIndex++)
            {
                /* Programming write */
                *(volatile uint32_t *)dest = *(volatile uint32_t *)source;
                /* Update dest, size, source index */
                dest += C55_WORD_SIZE;
                source += C55_WORD_SIZE;
                size -= C55_WORD_SIZE;

                /* Is it time to do page programming?  */
                if(0U == (dest % FLASH_C55_PROGRAMABLE_SIZE))
                {
                    break;//////////////////////////////////////////  it will break when data in two pages
                }
            }

Best Regards,

gong jun

标记 (1)
1 解答
2,538 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

here is an explanation of the behavior:

pastedImage_1.png

Regards,

Lukas

在原帖中查看解决方案

2 回复数
2,539 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

here is an explanation of the behavior:

pastedImage_1.png

Regards,

Lukas

2,538 次查看
gj3526
Contributor III

hi Lukas,

It seems that I can only change the SREC file,Thank you very much!

Best Regards,

gong jun

0 项奖励
回复