| ??? 10/08/03 07:56 Read: times |
#56302 - RE: at89c5131 builtin flash-api functions Responding to: ???'s previous message |
Hi,
well, I do not work with this device but with similar ones; anyway here are my suggestions. First of all, it seems you mixed Flash Drivers API with USB Bootloader API. Sure, for second one, Id_read_command is 0x05 and Read Manufacturer Code is 0x30. But it all is for commands which are sent via USB link when MCU is under In-system programming mode. I mean that these bytes are part of sequence which is sent from host for reading Manufacturer Code. Do you understand for this line? Okay, let continue. Flash API is ANOTHER part of bootloader. It has own commands with different format structure. Usualy, you put requested command into R1 and command descriptors into ACC and DPTR(s). For example, to read Manufacturer ID (__api_rd_manufacturer) you should do something like: ; save interrupts and registers; clear EA ; .... MOV R1,#0x00 ; command: read IDs MOV DPTR,#0x0000 ; descriptor: ID of Manufacturer ; map bootloader and reset watchdog if used ; .... LCALL 0xFFF0 ; invoke Flash API ; here ACC contains returned Manufacturer ID; utilize it if need ; unmap bootloader, reset watchdog again ; restore registers and interruptsSo, your trouble is that you mixed Flash API and Bootloader API; they are different parts of bootloader with different Entry Points, commands and formats. Good days! |
| Topic | Author | Date |
| at89c5131 builtin flash-api functions | 01/01/70 00:00 | |
| RE: at89c5131 builtin flash-api functions | 01/01/70 00:00 | |
RE: at89c5131 builtin flash-api functions | 01/01/70 00:00 |



