P89LV51RD2 ISP Entry mode

Started by YJ, January 21, 2008, 11:20:33 PM

Previous topic - Next topic

YJ

I am now use the latest version of bootloader for my RD2 device, and i want to specific a port pin to determine if the device execute the user's code or enter the autobaud sequence of ISP mode.But my P89LV51RD2 device have a old bootloader version which is V5,so i must to update my bootloader first,then use the "ISP Entry mode" command to set my GPIO pin,and then download my own code.My question as follow:
1, Can I change the default ISP entry mode by modity the HEX file of latest version bootloader?
2, Can I combine the bootloader and my own code to one HEX file and use one clik programming?

Sorry for my English,Thanks a lot.

Jan Waclawek

In theory, both are possible, but you first need to understand how the "bootloader updater" works. You can for example disassemble the "updater" and also try to work out of the hints I scattered around both this and the 8052.com Forum.

Nevertheless it might be easier simply to develop a command-line based tool (maybe as simple as a .bat file) performing all three operations via the command-line interface of FM.

JW

YJ

#2
I Know the command-line interface of FM,and I also write my own .bat file,and it workes well.But for mass production ,we don't use FM but parallel programmer.  We update to the latest version bootloader and change the default ISP entry mode only want to let the device execute use code immediatelly after every reset.So I must to try any other way.

Thanks

Jan Waclawek

You then want to check your production parallel programmer  (perhaps contact its vendor) if it is capable of programming both the boot block together with the application block, and how to load the hexfiles into it.
---
One of the options how to approach the "no wait for autobaud upon reset" problem would be to disable the bootloader completely and write your own bootloader into the application itself, using IAP; or simply calling the original bootloader from the application upon appropriate stimulus. You still want to keep most of the bootloader as it contains also the IAP routines themselves; but you can safely overwrite the first few bytes to perform software reset (causing also switch to application block) immediately as the first instruction in the boot block.

I have already sucessfully modified the bootloader - see my webpage - and you can contact me directly if you want to discuss this further.

Jan Waclawek