Hi,
I'm using a AT89C51ED2. Sometimes the application needs to start the Atmel ISP bootloader, e.g. to enable re-programming the flash. Normally this is done by the following API procedure:
void __api_start_bootloader (void) { __api_wr_BSB (0xFF); __api_wr_SBV (0xFC); // stop application peripherals T2CON=0x00; TL2=0x00; TH2=0x00; BDRCON=0x00; TCON=0x00; SCON = 0x00; TMOD = 0x00; PCON = 0x00; TCON = 0x00; EA = 0; MAP_BOOT; __API_JMP_BOOTLOADER(); }
The problem ist the writing of 0xFF to BSB, because it inhibits the start of my application on the next reboot. I'm looking for a way of starting the bootloader without the need of modifying the BSB. Simply commenting out the "__api_wr_BSB()" line is not possible, because then the bootloader immediately returns to the application.
Any idea?
Jürgen