1945142_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

1945142_en-US

1945142_en-US

MC56F83789 : The code is working while debug but not working the same code after falshing

Hi,


When the code Debug with MC56F83789 the logic is completely working but flashing the code the logic is not working as expected.

Please look into this issue.

@xiangjun_rong 

Re: MC56F83789 : The code is working while debug but not working the same code after falshing

Hi,

I suppose that the MC56F83789 enters bootloader mode, so the application code is not executed.

Because there is ROM bootloader for MC56F83xxx, so a question arise, how does the
MC56F83xxx enter bootloader mode or execute code in flash directly.
There are two structures in
Flash_config.c to configure flash and ROM.
(a). You can change below values to configure Flash, such as secure or not, backdoo
r key,
boot from ROM or not, etc.
static
const uint8_t _flash_config_field [] =
/* NV_BACKKEY3: KEY=0xFF
0xFFU,
/* NV_BACKKEY2: KEY=0xFF
0xFFU,
/* NV_BACKKEY1: KEY=0xFF
0xFFU,
/* NV_BACKKEY0: KEY=0xFF
0xFFU,
/* NV_BACKKEY7: KEY=0xFF
0xFFU,
/* NV_BACKKEY6: KEY=0xFF
0xFFU,
/* NV_BACKKEY5: KEY=0xFF
0xFFU,
/* NV_BACKKEY4: KEY=0xFF
0xFFU,
/* NV_FPROT3: PROT=0xFF
0xFFU,
/* NV_FPROT2: PROT=0xFF
0xFFU,
/* NV_FPROT1: PROT=0xFF
0xFFU,
/* NV_FPROT0: PROT=0xFF
0xFFU,
/* NV_FSEC: KEYEN=1,MEEN=3,FSLACC=3,SEC=2 (Note: set SEC to
00b for secure) */
0x7EU,
/* NV_FOPT: FOPT[7:6] = 11b means boot from ROM, other value
means boot from Flash */
0x3FU,
/* Reserved
0xFFU,
/* Rese rved */
0xFFU

};
For the above red 0x3F data, it’s bit7 and bit6 are zero, it means the MC56F83xxx starts
from Flash. If the data is changed to 0xFF, it means the MC56F83xxx starts from
bootloader after Reset.

Hope it can help you

BR

XiangJun Rong

タグ(1)
評価なし
バージョン履歴
最終更新日:
‎11-21-2025 08:56 PM
更新者: