除了上拉DP方法外,有沒有軟件的方法讓已經(jīng)有代碼的返回到bootloader代碼下載狀態(tài)?
根據(jù)手冊,擦除3800h地址的4個字節(jié)代碼后reset復位可行嗎?還是說需要修改NO_BOOT_LOAD標記位后reset?
除了上拉DP方法外,有沒有軟件的方法讓已經(jīng)有代碼的返回到bootloader代碼下載狀態(tài)?
根據(jù)手冊,擦除3800h地址的4個字節(jié)代碼后reset復位可行嗎?還是說需要修改NO_BOOT_LOAD標記位后reset?
if you want to activate the bootloader from user mode just exexute a LCALL 0x3800 or LJMP 0x3800.?
It might be a good idea to disable all irqs before and maybe set the clock to the default 6MHz although i also have started the bootloader at 24Mhz.
Example (keil)
#define CALL(addr) (((void(*)(void))(unsigned char code *)addr)())
...
if(bWantBootLoader)
{
? ? EA=0;
? ? CALL(0x3800);
? ? while(1);
}
....
thanks bro,i'll gonna try your code!