| Autore | Messaggio |
|---|
Kripton2035
Iscritto il: 19 luglio 2001 Interventi: 482 Contribuito: 15 Location: Terra
| 03 aprile 2006 8:28 Re: Progetto di sostituire CY7C64613 nel ICD2 | | |
|
| | predrage ha scritto: | I miei amici non riescono a programmazione ICD2_4550_BOOT_0180.BIN in 4550. I'v cercato di aprire il file bin con winpic 800 software, ma è fallito. I tryed per aprirlo con l'opzione "tutti i file" in "tipi di file" perché non vi è alcun sostegno diretto per bin. ICprog che hanno il supporto (per aprire il file bin), ma non può programma 4550. In realtà non vi è nella lista dei dispositivi 4550. Che cosa devo fare adesso? Eventuali suggerimenti? Sono solo un principiante, ma ho buona volontà di aiutare. Ci scusiamo per il mio cattivo inglese. |
rinominare il file. BIN a. HEX e winpic si è aperto! talvolta un sacco di file sono. BIN, in realtà, sono Intel. hex! per essere sicuro, aprire il file con il notepad, se contiene le linee che iniziano con ":" e poi rinominare in. hex e aperto con winpic .. se si tratta di spazzatura, poi un bin2hex devono essere utilizzati per aprirlo. |
|
| Torna a inizio pagina | |
 |
narccizzo
Iscritto il: 20 gennaio 2006 Interventi: 173 Contribuito: 4 Località: Patzcuaro, Michoacan, MESSICO
| 03 aprile 2006 9:42 Re: Progetto di sostituire CY7C64613 nel ICD2 | | |
|
| Questi sono i due file bin convertito in esadecimale, ho aperto il file con il bidone ic-prog software quindi salvare i file in formato esadecimale, se si dà un'occhiata a questi file è possibile vedere una stringa leggibile "Microchip Tecnology ICD2 USB Device icd2 usb" l'indirizzo 0x0ee7 per la boot.hex file e la stessa stringa nel 0x0b8e per la os.hex file, i dont hanno un disassembler per esplorare più in dettaglio questo file, ma qualcosa mi dice che questi due file sono tutti di che abbiamo bisogno.
BR Narccizzo
|
|
| Torna a inizio pagina | |
 |
Jay.slovak
Iscritto il: 23 marzo 2006 Interventi: 11
| 03 aprile 2006 11:17 Re: Progetto di sostituire CY7C64613 nel ICD2 | | |
|
| | narccizzo ha scritto: | Questi sono i due file bin convertito in esadecimale, ho aperto il file con il bidone ic-prog software quindi salvare i file in formato esadecimale, se si dà un'occhiata a questi file è possibile vedere una stringa leggibile "Microchip Tecnology ICD2 USB Device icd2 usb" l'indirizzo 0x0ee7 per la boot.hex file e la stessa stringa nel 0x0b8e per la os.hex file, i dont hanno un disassembler per esplorare più in dettaglio questo file, ma qualcosa mi dice che questi due file sono tutti di che abbiamo bisogno.
BR Narccizzo |
Sei sicuro di aver convertito il file correttamente? Se l'importazione in MPLAB, il codice non ha senso, tutto ciò che non è solo passando attraverso il Programma di memoria e fare NOPs. Nulla di utile sta accadendo sia in avvio e OS HEXs. Anche la configurazione di bit sono diversi nei due file! |
|
| Torna a inizio pagina | |
 |
Zedman
Iscritto il: 13 ottobre 2003 Interventi: 294 Contribuito: 2
| 03 apr 2006 11:19 Progetto per sostituire CY7C64613 nel ICD2 | | |
|
| Albert,
il driver del kernel (s) si aspettano, il cipresso si collega a un altro vid / pid quando primi collegato, e dopo il caricatore sys download è fw si riconnettersi come un altro vid / pid così gli altri sistemi di colloqui ad esso. Dobbiamo attuare solo la seconda. Iam @ lavoro quindi non posso fare niente qui difficile aspettarsi Thinkin ' ... |
|
| Torna a inizio pagina | |
 |
silvio
Iscritto il: 31 dicembre 2001 Interventi: 800 Contribuito: 90
| 03 aprile 2006 11:31 Re: Progetto di sostituire CY7C64613 nel ICD2 | | | tag: MPLAB protocollo icd2 cipresso disassemblatore disassemblatore cipresso |
|
| Hi Zedman,
it's a must to understand what's under cover. Per quanto riguarda CY hex file non è solo una questione di buon disassembler che conosce il cipresso chip, ma la lettura di 436 pagine EZ-USB FX TechRefManual è un "must" per capire cosa c'è sotto la copertura. E non credo di aver tempo per questo. Tuttavia, se non hai familiarità con opcode 8051, l'analisi del codice di prendere un po 'di tempo. (I know you're familiare con quelli PIC) with appropiate values from CY7C64613 registers 0x7800-0x7FFF but you'll definitely end up turning the pages of TechRefManual looking for definitions. Sono in grado di sostituire tutti gli eventi di MOV DPTR, # LXXXX con i valori appropriati da CY7C64613 registri 0x7800-0x7FFF ma sicuramente avrete finire girando le pagine di ricerca di definizioni TechRefManual. Oltre che avrebbe qualche difficoltà di assegnare nomi di bit che si trovano o nel programma chiaro, fintanto che non sono mappati in SFR spazio (che termina a 0 o 8). with MOV DPTR, #EP0CS but it's difficult to say SETB HSNAK due to the above reasons. E 'facile da sostituire MOV DPTR, # L7FB4 con MOV DPTR, # EP0CS ma è difficile dire SETB HSNAK causa le ragioni di cui sopra.
and EP0STAL L which are affected in the bellow code at 0x03E2. Prendiamo l'esempio bit HSNAK e EP0STAL L che sono colpiti in codice a soffietto 0x03E2. | Codice: | L03E2: LCALL L0FBE JNC L03EE MOV DPTR, # L7FB4 MOVX A, @ DPTR ORL A, # 01h; qualche tipo di SETB EP0STALL MOVX @ DPTR, A L03EE: MOV DPTR, # L7FB4 MOVX A, @ DPTR ORL A, # 02h; qualche tipo di SETB HSNAK MOVX @ DPTR, A RET
L0FBE: SETB C RET
|
Prendete per esempio (CP_1.asm) il codice di righe che iniziano con offset 0x0100 (chiamato da una subroutine 0x05FA), la prima linea di codice utilizzato immediatelly tabella qui di vettore di interrupt Al 0x7FE9 RAM potete trovare 2a byte 8 byte di dati a pacchetto USB SETUP (vedere a pagina 215 table9-1), nel senso bRequest settore (cfr. tabella 9-2).
| Codice: | L0100: MOV DPTR, # L7FE9 MOVX A, @ DPTR JNZ L0109 LJMP L029B; se bRequest = GetStatus andare alla 0x029B L0109: DEC A JNZ L010F LJMP L0317; se bRequest = Cancella Feature, salti al 0x0317 L010F: ADD A, # 0FEh JNZ L0116 LJMP L038E; se bRequest = Set Feature, salti al 0x038E L0116: ADD A, # 0FBh JNZ L011D LJMP L0295; se bRequest = ArrivareProspettiPartner configurazione, andare alla 0x0295 L011D: A DEC JNZ L0123 LJMP L028F; se bRequest = Imposta di configurazione, andare alla 0x028F L0123: DEC A JNZ L0129 LJMP L0283; se bRequest = ArrivareProspettiPartner Interface, salti al 0x0283 L0129: DEC A JNZ L012F LJMP L0289; se bRequest = Imposta Interface, salti al 0x0289 L012F: ADD A, # 05h JZ L0136 LJMP L03E2; se bRequest = nessuno di quanto sopra, quindi impostare i bit HSNAK ; e EP0STALL di EP0CS controllo e registro di stato e e poi a RET 0x05FD ; L0136: LCALL L0F7A; se bRequest = ArrivareProspettiPartner Descriptor, LCALL 0x0F7A dove JC L013E; trasportare bit è impostato di default, quindi andare alla 0x013E LJMP L03EE; se a portare 0x0F7A sarebbe 0 per default, impostate bit HSNAK ; EP0CS di controllo e registro di stato e RET a 0x05FD ; L013E: MOV DPTR, # L7FEB; qui perché è stato un bRequest ArrivareProspettiPartner Descriptor MOVX A, @ DPTR; quindi, controllare il campo di WValueH USB SETUP pacchetto ADD A, # 0FEh JZ L015F; se wValueH era 0x02 salti al 0x015F DEC A JZ L0190; se wValueH era 0x03 salti al 0x0190 ADD A, # 02h JZ L0150; se wValueH era 0x01 salti al 0x0150 LJMP L0279, se è diverso wValueh di una 0x01 o 0x02 o 0x03 quindi impostare ; bit HSNAK e EP0STALL di registro e EP0CS RET a 0x05FD ; L0150: MOV A, 0Ch; wValueH qui perché è stato 0x01, così carico SUDPTR globale registro USB MOV DPTR, # L7FD4; con valore 0x0C0D, quindi impostare HSNAK po 'di EP0CS e RET a 0x05FD MOVX @ DPTR, A MOV A, 0DH MOV DPTR, # L7FD5 MOVX @ DPTR, A LJMP L03EE L015F: MOV DPTR, # L7FEA; ora guardare al settore della wValueL USB SETUP pacchetto ; ; ; ; ; e così via ...................
|
port2: Microchip MPLAB ICD2 Fw client Oppure questa tabella di ricerca a compensare 0x0622 che corrispondono al Kripton2035 port2: Microchip MPLAB ICD2 Fw cliente
| Codice: | Tabella 5-9. Default USB Device Descriptor
RAM Rapporto Offset Campo Descrizione
0622 0x12 0 blength Lunghezza del presente Descriptor = 18 byte 0623 0x01 1 bDescriptorType Descriptor Device Type = 0624 0x00 2 bcdUSB (L) USB Specification Version 1.10 (L) 0625 0x01 3 bcdUSB (H) USB Specification Version 1.10 (H) 0626 0xFF 4 bDeviceClass Dispositivo di classe (FF è Vendor specifici) 0627 0xFF 5 bDeviceSubClass Device Sub-Class (FF è Vendor specifiche) 0628 0xFF 6 bDeviceProtocol protocollo Device (FF è Vendor specifiche) 0629 0x40 7 bMaxPacketSize0 dimensione massima del pacchetto per EP0 = 64 byte 062A 0xD8 8 idVendor (L) Vendor ID (L) = 04D8H Microchip Technology 062B 0x04 9 idVendor (H) Vendor ID (H) 062C 0x01 10 idProduct (L) Product ID (L) ICD2 = 8001H 062D 0x80 11 idProduct (H) Product ID (H) 062E 0x03 12 bcdDevice (L) numero di release del dispositivo (BCD, L) 062F 0x00 13 bcdDevice (I) Numero di rilascio del dispositivo (BCD, H) 0630 0x00 14 iManufacturer Marca Indice String = None 0631 0x00 15 iProduct Prodotto Indice String = None 0632 0x00 16 iSerialNumber Numero di serie Nessuno Indice Stringa = 0633 0x01 17 bNumConfigurations Numero di Configurazioni in questo Interfaccia = 1
Tabella 5-10. USB configurazione di default Descriptor
RAM Rapporto Offset Campo Descrizione
0634 0x09 0 blength Lunghezza del presente Descriptor = 9 bytes 0635 0x02 1 bDescriptorType Descriptor Type = Configurazione 0636 0x74 2 wTotalLength (L) Totale Lunghezza (L) Compreso Interface e Endpoint Descrittori = 116 0637 0x00 3 wTotalLength (H) Lunghezza totale (H) 0638 0x01 4 bNumInterfaces numero di interfacce in questa configurazione 0639 0x01 5 bConfigurationValue il valore di configurazione usati da Set_Configuration Richiesta di configurazione Selezionare questa 063A 0x00 6 iConfiguration Indice dei Stringa Descrivendo questa configurazione = None 063B 0x80 7 bmAttributes Attributi - Bus-Powered, n. Wakeup 063C 0x4B 8 MaxPower Potenza massima - 150 mA
Tabella 5-11. Interfaccia USB predefinito 0, Alternate Impostazione 0 Descriptor
RAM Rapporto Offset Campo Descrizione
063D 0x09 0 blength Lunghezza del Interface Descriptor 063E 0x04 1 bDescriptorType Descriptor Type = Interfaccia 063F 0x00 2 bInterfaceNumber Zero-based Indice di questa interfaccia = 0 0640 0x00 3 bAlternateSetting Supplente valore = 0 0641 0x0E 4 Numero di bNumEndpoints Estremità in questo Interface (non contando UEB) = 14 0642 0xFF Interfaccia Classe 5 bInterfaceClass = Vendor Specific 0643 0xFF 6 bInterfaceSubClass Interfaccia Sub-class = Vendor Specific 0644 0xFF 7 bInterfaceProtocol Interfaccia protocollo = Vendor Specific 0645 0x00 8 iInterface Indice di Stringa Descriptor per questa interfaccia = None
Tabella 5-14. Interfaccia di default 0, Alternate Impostazione 1, Bulk Endpoint Descriptors
RAM Rapporto Offset Campo Descrizione
0646 0x07 0 blength Lunghezza del presente Endpoint Descriptor 0647 0x05 1 bDescriptor Descriptor Tipo Tipo = Endpoint 0648 0x01 2 bEndpointAddress Endpoint Direzione (1 in) e Indirizzo OUT1 = 0649 0x02 3 bmAttributes XFR Tipo = RINFUSA 064A 0x40 4 wMaxPacketSize (L), dimensione massima del pacchetto = 64 Byte 064B 0x00 5 wMaxPacketSize (H), dimensione massima del pacchetto - Alta 064C 0x01 6 bInterval intervallo di polling in millisecondi
064D 0x07 0 blength Lunghezza del presente Endpoint Descriptor 064E 0x05 1 bDescriptor Descriptor Tipo Tipo = Endpoint 064F 0x02 2 bEndpointAddress Endpoint Direzione (1 in) e Indirizzo OUT2 = 0650 0x02 3 bmAttributes XFR Tipo = RINFUSA 0651 0x40 4 wMaxPacketSize (L), dimensione massima del pacchetto = 64 Byte 0652 0x00 5 wMaxPacketSize (H), dimensione massima del pacchetto - Alta 0653 0x01 6 bInterval intervallo di polling in millisecondi
0654 0x07 0 blength Lunghezza del presente Endpoint Descriptor 0655 0x05 1 bDescriptor Descriptor Tipo Tipo = Endpoint 0656 0x03 2 bEndpointAddress Endpoint Direzione (1 in) e Indirizzo OUT3 = 0657 0x02 3 bmAttributes XFR Tipo = RINFUSA 0658 0x40 4 wMaxPacketSize (L), dimensione massima del pacchetto = 64 Byte 0659 0x00 5 wMaxPacketSize (H), dimensione massima del pacchetto - Alta 065A 0x01 6 bInterval intervallo di polling in millisecondi
065B 0x07 0 blength Lunghezza del presente Endpoint Descriptor 065C 0x05 1 bDescriptor Descriptor Tipo Tipo = Endpoint 065D 0x04 2 bEndpointAddress Endpoint Direzione (1 in) e Indirizzo = OUT4 065E 0x02 3 bmAttributes XFR Tipo = RINFUSA 065F 0x40 4 wMaxPacketSize (L), dimensione massima del pacchetto = 64 Byte 0660 0x00 5 wMaxPacketSize (H), dimensione massima del pacchetto - Alta 0661 0x01 6 bInterval intervallo di polling in millisecondi
0662 0x07 0 blength Lunghezza del presente Endpoint Descriptor 0663 0x05 1 bDescriptor Descriptor Tipo Tipo = Endpoint 0664 0x05 2 bEndpointAddress Endpoint Direzione (1 in) e Indirizzo OUT5 = 0665 0x02 3 bmAttributes XFR Tipo = RINFUSA 0666 0x40 4 wMaxPacketSize (L), dimensione massima del pacchetto = 64 Byte 0667 0x00 5 wMaxPacketSize (H), dimensione massima del pacchetto - Alta 0668 0x01 6 bInterval intervallo di polling in millisecondi
0669 0x07 0 blength Lunghezza del presente Endpoint Descriptor 066A 0x05 1 bDescriptor Descriptor Tipo Tipo = Endpoint 066B 0x06 2 bEndpointAddress Endpoint Direzione (1 in) e Indirizzo OUT6 = 066C 0x02 3 bmAttributes XFR Tipo = RINFUSA 066D 0x40 4 wMaxPacketSize (L), dimensione massima del pacchetto = 64 Byte 066E 0x00 5 wMaxPacketSize (H), dimensione massima del pacchetto - Alta 066F 0x01 6 bInterval intervallo di polling in millisecondi
0670 0x07 0 blength Lunghezza del presente Endpoint Descriptor 0671 0x05 1 bDescriptor Descriptor Tipo Tipo = Endpoint 0672 0x07 2 bEndpointAddress Endpoint Direzione (1 in) e Indirizzo OUT7 = 0673 0x02 3 bmAttributes XFR Tipo = RINFUSA 0674 0x40 4 wMaxPacketSize (L), dimensione massima del pacchetto = 64 Byte 0675 0x00 5 wMaxPacketSize (H), dimensione massima del pacchetto - Alta 0676 0x01 6 bInterval intervallo di polling in millisecondi
RAM Rapporto Offset Campo Descrizione
0677 0x07 0 blength Lunghezza del presente Endpoint Descriptor 0678 0x05 1 bDescriptor Descriptor Tipo Tipo = Endpoint 0679 0x81 2 bEndpointAddress Endpoint Direzione (1 in) e Indirizzo = IN1 067A 0x02 3 bmAttributes XFR Tipo = RINFUSA 067B 0x40 4 wMaxPacketSize (L), dimensione massima del pacchetto = 64 Byte 067C 0x00 5 wMaxPacketSize (H), dimensione massima del pacchetto - Alta 067D 0x01 6 bInterval intervallo di polling in millisecondi
067E 0x07 0 blength Lunghezza del presente Endpoint Descriptor 067F 0x05 1 bDescriptor Descriptor Tipo Tipo = Endpoint 0680 0x82 2 bEndpointAddress Endpoint Direzione (1 in) e Indirizzo = IN2 0681 0x02 3 bmAttributes XFR Tipo = RINFUSA 0682 0x40 4 wMaxPacketSize (L), dimensione massima del pacchetto = 64 Byte 0683 0x00 5 wMaxPacketSize (H), dimensione massima del pacchetto - Alta 0684 0x01 6 bInterval intervallo di polling in millisecondi
0685 0x07 0 blength Lunghezza del presente Endpoint Descriptor 0686 0x05 1 bDescriptor Descriptor Tipo Tipo = Endpoint 0687 0x83 2 bEndpointAddress Endpoint Direzione (1 in) e Indirizzo = IN3 0688 0x02 3 bmAttributes XFR Tipo = RINFUSA 0689 0x40 4 wMaxPacketSize (L), dimensione massima del pacchetto = 64 Byte 068A 0x00 5 wMaxPacketSize (H), dimensione massima del pacchetto - Alta 068B 0x01 6 bInterval intervallo di polling in millisecondi
068C 0x07 0 blength Lunghezza del presente Endpoint Descriptor 068D 0x05 1 bDescriptor Descriptor Tipo Tipo = Endpoint 068E 0x84 2 bEndpointAddress Endpoint Direzione (1 in) e Indirizzo = IN4 068F 0x02 3 bmAttributes XFR Tipo = RINFUSA 0690 0x40 4 wMaxPacketSize (L), dimensione massima del pacchetto = 64 Byte 0691 0x00 5 wMaxPacketSize (H), dimensione massima del pacchetto - Alta 0692 0x01 6 bInterval intervallo di polling in millisecondi
0693 0x07 0 blength Lunghezza del presente Endpoint Descriptor 0694 0x05 1 bDescriptor Descriptor Tipo Tipo = Endpoint 0695 0x85 2 bEndpointAddress Endpoint Direzione (1 in) e Indirizzo IN5 = 0696 0x02 3 bmAttributes XFR Tipo = RINFUSA 0697 0x40 4 wMaxPacketSize (L), dimensione massima del pacchetto = 64 Byte 0698 0x00 5 wMaxPacketSize (H), dimensione massima del pacchetto - Alta 0699 0x01 6 bInterval intervallo di polling in millisecondi
069A 0x07 0 blength Lunghezza del presente Endpoint Descriptor 069B 0x05 1 bDescriptor Descriptor Tipo Tipo = Endpoint 069C 0x86 2 bEndpointAddress Endpoint Direzione (1 in) e Indirizzo IN6 = 069D 0x02 3 bmAttributes XFR Tipo = RINFUSA 069E 0x40 4 wMaxPacketSize (L), dimensione massima del pacchetto = 64 Byte 069F 0x00 5 wMaxPacketSize (H), dimensione massima del pacchetto - Alta 06A0 0x01 6 bInterval intervallo di polling in millisecondi
06A1 0x07 0 blength Lunghezza del presente Endpoint Descriptor 06A2 0x05 1 bDescriptor Descriptor Tipo Tipo = Endpoint 06A3 0x87 2 bEndpointAddress Endpoint Direzione (1 in) e Indirizzo IN7 = 06A4 0x02 3 bmAttributes XFR Tipo = RINFUSA 06A5 0x40 4 wMaxPacketSize (L), dimensione massima del pacchetto = 64 Byte 06A6 0x00 5 wMaxPacketSize (H), dimensione massima del pacchetto - Alta 06A7 0x01 6 bInterval intervallo di polling in millisecondi
che è poi seguito da unicode zero si è concluso sotto forma di stringa "Microchip Technology ICD2 USB Device"
|
Tuttavia se non riesci con bin 4550, posso cercare di aiutare con l'aggiunta di commenti in CY asm file. |
|
| Torna a inizio pagina | |
 |
Zedman
Iscritto il: 13 ottobre 2003 Interventi: 294 Contribuito: 2
| 03 aprile 2006 17:10 Re: Progetto di sostituire CY7C64613 nel ICD2 | | | tag: icd2.dll |
|
| Ciao Silvio,
grazie per l'info, molto tempo fa ho avuto per analizzare uno bin proveniente da una eprom chip. Non ho ancora nessun tipo, né il processore del circuito. Ma ho dovuto trovare il modo si tratta di una scheda di memoria, ed è dati. Ho assunto è un tipo di chip 8051 e provato un sacco di disassemblers, e si è conclusa con un 80C542 (i cant ricordare che uno è stato esattamente) I figured it out da i numeri di porta e di come il codice si occupa di singoli porto pin. Ma ci sono voluti 2 giorni e settimane di lavoro notturno per me, un sacco di lettura / debug / apprendimento. Ecco perché ho voluto un assemblatore ciò che è in grado di fare le cose che lei ha parlato di me, invece ...  Grazie ancora Silvio.
-----------------------------
Iam cominciando a credere a tutti voi, in base alle bin. Ho fatto una ricerca in ICD2 dll e scoprì che esso sollecita GETUSBDESCRIPTOR e numero di controlli nel Descrittore e se partite ICD2 versione più recente di quello che ha firmato nel 4550 il mio Descrittore di quello che fa un send4550image chiamata! E ci sono anche i descrittori di file nel cestino identico a quello caricato Kripton. Una cosa che non capisco è per questo che hanno fornito l'immagine di boot? E perché ICD2.dll Prova a scaricare questo file? Se sono a casa, mi tenta di impostare il mio descrittori a corrispondere a quello che ho trovato nel bidone e cercherà MPLAB su di esso.
Penso che siamo più vicini! 
Aggiunto dopo 46 minuti:
E vi è una cosa magica nel primo btyes di boot bin: MCHP (microchip?) Ho cercato di esso, se è più tardi (dopo il carico) sostituisce con reale punto di ingresso o st GOTO, ma non nel ICD2.dll.
Aggiunto dopo 3 ore 34 minuti:
Guardate questa:
Ho fatto ciò che ho detto prima, basta impostare il numero di versione più recente si aspetta MPLAB e tenta di inviare il sistema operativo! (Naturalmente il mio fw non è un boot loader)
| Codice: | MPLAB ICD 2 Ready Collegamento a MPLAB ICD 2 ICD0289: Impossibile ripristinare programma ICD2 USB OS firmware. ICD0021: Impossibile connettersi con MPLAB ICD 2 MPLAB ICD 2 Ready
|
In qualche modo il boot loader dovrebbe funzionare, io cerco di fare qualcosa durante la notte. |
|
| Torna a inizio pagina | |
 |
narccizzo
Iscritto il: 20 gennaio 2006 Interventi: 173 Contribuito: 4 Località: Patzcuaro, Michoacan, MESSICO
| 03 apr 2006 18:43 Progetto per sostituire CY7C64613 nel ICD2 | | |
|
| Hi JaySlovak No, non è sicuro di Im, ho solo aperto il bidone e salvarlo in formato esadecimale. |
|
| Torna a inizio pagina | |
 |
Jay.slovak
Iscritto il: 23 marzo 2006 Interventi: 11
| 03 aprile 2006 20:45 Re: Progetto di sostituire CY7C64613 nel ICD2 | | |
|
| | narccizzo ha scritto: | Hi JaySlovak No, non è sicuro di Im, ho solo aperto il bidone e salvarlo in formato esadecimale.  |
Sì, è strano come la stringa è leggibile, solo il codice non fa nulla |
|
| Torna a inizio pagina | |
 |
Zedman
Iscritto il: 13 ottobre 2003 Interventi: 294 Contribuito: 2
| 03 aprile 2006 22:25 Re: Progetto di sostituire CY7C64613 nel ICD2 | | | tag: icd2.dll |
|
| Buone notizie, dopo 2 ore di debugging,
ICD2.dll fa uso di TANTO bin. Il file di sistema operativo vuole essere scaricato solo per ICD2s con il nuovo numero di serie del prodotto. Ma quando si modifica la versione id nel nome del file di OS.bin * _FFFF.bin a quello che inizia a controllare la versione del bootloader cercare:
| Codice: | Collegamento a MPLAB ICD 2 ICDWarn0062: Il USB di avvio del firmware del ICD2 è attiva e modalità di comunicazione con l'ICD2. Questo firmware è obsoleta e deve essere aggiornato. Essa non può essere aggiornato, mentre attiva. Tuttavia, si può continuare a operare con l'attuale di avvio del firmware, se si sceglie di farlo. Vuoi continuare?
|
Se premere YES qui che si tenta di connettersi al ICD2 stesso, e si blocca (ho solo il 4550 ancora installato). Se premere NO rispetto a quanto sembra si tenta di aggiornarlo ma abbiamo bisogno di un bootloader qui come questo, così appare questo messaggio:
| Codice: | ICD0288: Impossibile ripristinare programma ICD2 USB di avvio del firmware. ICD0021: Impossibile connettersi con MPLAB ICD 2 MPLAB ICD 2 Ready
|
Ok ragazzi, pensare pensare pensare a come possiamo utilizzare bin che per ottenere un lavoro in un bootloader 4550!
Aggiunto dopo 2 minuti:
Ho anche compilato il campione del bootloader con la corretta VID / PID, ma ha ottenuto gli stessi risultati con il mio 4550.
Aggiunto dopo 16 minuti:
Può essere, che non siamo in grado di ottenere il primo iniziale:) parte del bootloader che carica il bootloader prima che carichi il sistema operativo ...
Aggiunto dopo 5 minuti:
Questo è il momento in cui dovrebbe rkodaira discarica per il 4550 il suo livello 0 bootloader. (con una grande speranza che non è protetto ...)
Rkodaira ABBIAMO BISOGNO DI VOI |
|
| Torna a inizio pagina | |
 |
albert22
Iscritto il: 20 luglio 2004 Interventi: 95 Contribuito: 3
| 03 aprile 2006 22:46 Re: Progetto di sostituire CY7C64613 nel ICD2 | | |
|
| Mi è stato l'analisi di un tabulato che ho con me del BL010101. e trovare alcune cose. Sembra di accettare o 5 comandi provenienti da PSP o la USART. 0x55 Eseguire codice a partire da 0x0010. 0x56 carico hex (questo sembra essere più subcommands) 0x5a invia i dati 0x01 0x01 0x03 (Versione del BL?) Due altri comandi appena si accende il led di errore e occupato e si blocca in un loop inffinite.
La seguente routine sono legate a ciò che ho chiamato il "carico hex" comando:
In un altro routine BL invia la seguente stringa 0x5b ", 0810C9", 0x5d Altre risposte embeded invia la seguente stringa in 0x5b ", 0A000", U, 0x31, U, 0x5d. (dove U sembra essere 0x31, 0x34, 0x36 e 0x37).
I didnt hanno molto tempo per proseguire con l'analisi. Né ho visto il cavo USB di monitoraggio che sono stati pubblicati perché Im a un cyber. Ma credo che questi dati devono essere confezionati in comunicazione USB |
|
| Torna a inizio pagina | |
 |
Zedman
Iscritto il: 13 ottobre 2003 Interventi: 294 Contribuito: 2
| 03 apr 2006 23:30 Progetto per sostituire CY7C64613 nel ICD2 | | |
|
| Albert,
Ho verificato che il numero di serie comm versus USB, USB utilizza un wrapper tramite la porta seriale cosa. Sembra che utilizza EP1 per il controllo dei porti (è OUT e IN) e EP2 come porta dati, solo in (ICD-> pc). |
|
| Torna a inizio pagina | |
 |
albert22
Iscritto il: 20 luglio 2004 Interventi: 95 Contribuito: 3
| 05 aprile 2006 6:39 Re: Progetto di sostituire CY7C64613 nel ICD2 | | |
|
| Ecco i miei progressi con la BL Non ci sono state tali subcommands. Il carico hex appena prende il comando hex segnalazioni e scrive i dati per il programma di memoria 2 byte alla volta. E per i diversi controlli tra cui la serie di errori di indirizzo. Ap. al fine di evitare il rafforzamento in BL programma. Ciò conferma che il BL è sempre residente al 877. Il [0A000 ", U, 0x31, U]. (2 ° U è il primo U 1) è improbabile che essere visto perché è un rapporto di errore. Gli errori includono: cattiva formato, controllo, indirizzo cattivo e gamma EEPROM errore di scrittura . La routine attende per 16 caratteri a partire da una 0x3c ('<') e termina con uno 0x3e ('>'). 16 caratteri questo header contiene l'indirizzo, la durata ed il checksum per i dati devono essere scritti in formato ASCII. Se l'intestazione è corretta Ap. BL risposte con "[0810C9]" I dati profilati dopo un 0x7b Questo formato sembra essere diversa da un intel formato esadecimale.
Zedman. Può essere qualcosa di simile è riconosciuta in RS232 Domani sarà a casa mia e in grado di installare hdd a controllare i log e vedere se posso essere di alcun aiuto. |
|
| Torna a inizio pagina | |
 |
Zedman
Iscritto il: 13 ottobre 2003 Interventi: 294 Contribuito: 2
| 05 aprile 2006 12:17 Re: Progetto di sostituire CY7C64613 nel ICD2 | | | tag: MPLAB protocollo icd2 icd2.dll icd2w2k.sys mplbcomm.dll |
|
| Sono bloccato con questa cosa USB. E io sono triste.
Non so che cosa fare dopo. Ho trascorso un sacco di tempo il debug icd2.dll.
Il problema è: non posso inviare anche un byte ritornare a MPLAB.
Mi spiego ciò che ho trovato fino ad ora, anche se non realmente interessati a uno (si desidera catturare finito cosa). (Ad eccezione di: Albert, Kripton, rkodaira, Silvio e ragazzi in questo thread)
Quindi, comunica con l'MPLAB ICD2 questo modo:
[MPLAB -> ICD2.dll -> MPLBCOMM.dll -> icd2w2k.sys ->] --- [ICD2 dispositivo]
Se si sceglie il tipo di connessione USB che chiederà il dispositivo Descrittore dal ICD2 e controlli per la versione del prodotto parola, se è 0x0003 che si tratta di una base di Cypress ICD2, se è 0x0010 che si tratta di un 4550 in base uno. Se 0x0010 trovato quello che dice quello che ho postato prima che il sistema operativo in ICD2 deve essere aggiornato. E 'interessante il fatto che se la versione (0100) nel nome del file viene modificato OS.bin FFFF a quello che salta questo passo e controlla la versione del bootloader. Qui ho dovuto patch ICD2.dll per farlo provare a controllare la versione del file BL.bin troppo, è che anche hardcoded è impostato su FFFF solito si tenta di effettuare l'aggiornamento, che è il motivo per cui ho patchato che (insieme a hardcoded FFFF inferiore), così ora dice ciò che ho troppo mentoined prima: il bl versione è troppo vecchia, ma non possono essere aggiornati, mentre è attiva.
Okay. Ho fatto un piccolo prog dal campione bootloader, con la corretta descrittori e cercando di comunicare con MPLAB per decifrare il protocollo e di emulare le BL nel nuovo 4550 ICD2. ICD2 che utilizza Kripton, (cipresso versione) 7 set OUT / IN punti finali, ma secondo i registri che usa solo per EP1 IN / OUT e per EP2 IN. (OUT mezzi PC-> Device) Sembra che invia i comandi specifici usb e dati attraverso EP1, e tornato su EP1, e invia i byte readed dal ICD2 del 877 attraverso distinti endpoint EP2 pollici
Quando si tenta di inviare MPLAB th OS.bin per aggiornare il fw gli ha espresso la chiamata alla getUSBdescriptor il driver del kernel, e invia un byte 0x12 lungo comando utilizzando il comando DeviceIOControl. I debug, si arriva al 4550 con successo. Than MPLAB rilascia un GetStatus chiamata, e sembra la chiamata da parametri che si aspetta 0x08 byte di dati. Ho creato il mio tampone con 8 byte, e impostare le proprietà di SIE. Ma mai che invia 8 byte indietro (non appare nella USBMon). Proprio in attesa. Ci possono essere molte cose. Forse ho sbagliato a fare prima la configurazione del 4550, ma ho provato con un altro progs e funziona, può inviare bytes indietro. So che l'host deve inviare al comando e di lasciare il dispositivo inviare ciò che vuole. Ma quando ho debug MBLBCOMM, ho visto che il comando non DeviceIOControl! Ho pensato che magari un po 'di intelligence è stato costruito in. Sistemi di file e si lascia cadere il pacchetto a causa del contenuto è sbagliato, ma penso che dovrebbe essere un compito più alto livello. Quando sono a casa mi GetLastError verificare il suo valore.
Chiunque ha qualche idea di come si può vedere se non vi è stato inviato un pacchetto, o come posso continuare? |
|
| Torna a inizio pagina | |
 |
Kripton2035
Iscritto il: 19 luglio 2001 Interventi: 482 Contribuito: 15 Location: Terra
| 05 apr 2006 16:59 Progetto per sostituire CY7C64613 nel ICD2 | | |
|
| può essere che si deve collegare un 877 per PSP del 4550 porta a vedere che cosa arriva attraverso, e 877 con il programma del bootloader abbiamo? possono essere i byte che stai aspettando provengono dalla EP2 e quindi la 877?
mi volete inviare un altro file di registro di una precisa condizione? dal modo in cui è sicuro avete bisogno di un registro rokaida con i suoi 4550 icd2 ..
PS: non mi interessa in questo progetto .. Sono solo curioso! Ho già un usb icd2! |
|
| Torna a inizio pagina | |
 |
Zedman
Iscritto il: 13 ottobre 2003 Interventi: 294 Contribuito: 2
| 05 apr 2006 20:08 Progetto per sostituire CY7C64613 nel ICD2 | | |
|
| Grazie Kripton,
I'll notifica quando ho bisogno di più dump , E 'un po' più complesso di quello che passa per il solo a 877 byte e ritorno, è un protocollo wrapper su di esso. Quello che ha detto è stato molto utile, ma rkodeira non si sacrify suo nuovo ICD2 ... Se egli, che con la discarica di questo processo di aggiornamento del sistema operativo potrebbe definire il protocollo di bene ... |
|
| Torna a inizio pagina | |
 |
Kripton2035
Iscritto il: 19 luglio 2001 Interventi: 482 Contribuito: 15 Location: Terra
| 05 apr 2006 22:09 Progetto per sostituire CY7C64613 nel ICD2 | | |
|
| | I dont anche lui ha bisogno di pensare sacrify sua icd2! solo alcune discariche con usbmon come ho fatto .. speriamo icd2 è ancora il mio lavoro! |
|
| Torna a inizio pagina | |
 |
albert22
Iscritto il: 20 luglio 2004 Interventi: 95 Contribuito: 3
| 05 aprile 2006 22:16 Re: Progetto di sostituire CY7C64613 nel ICD2 | | | tag: icd2 carico hex comando |
|
| Non è possibile installare HHD monitor per visualizzare il log perché ho solo W98 a casa. Potete esportare un dump del sistema operativo a scaricare un file. Txt, per me? ------- Come il CY resetta il 877? Vi è un segnale (pin 43) alla base del 1 ° trimestre cui il collettore è MCLR. Ma questo va a un connettore chiamato PROG. Ora mi rendo conto che questo segnale deve andare troppo per il 877. Ci sarebbe bisogno di sapere che USB comando reimposta il 877. Può essere che è in uno dei punti terminali di controllo? I dont sapere qual è la funzione di questo connettore PROG. ma l'extra endpoint possono essere correlate ad esso. ---------- Uno del sistema operativo caricato al ICD2 sembra essere: ICD01020405.hex ho cercato di disassemby, ma non posso ottenere il disassembler per sostituire la hex indirizzi con il nome dei registri. Ci vorrà più tempo per capire come funziona. Un fatto interessante è che il codice inizia a 0x0010. Ricorda che il BL chiede questo indirizzo con l'esecuzione di comandi.
La versione riportata da BL MPLAB è 01.01.01.00 questo va abbastanza bene con il comando che BL risposte 01,01,01,03 --------- Non vi è alcun DPot (MCP41xxxx) nel brasiliano ICD. Come si impostare Vpp? La maggior parte dei cloni sono un Vpp. Ciò significa che il brasiliano ICD è solo un clone a basso costo e non il nuovo ICD2? I dont think microchip che è andato a tempo determinato per un Vpp. Se vi è un altro metodo di controllo della Vpp, diverso da quello che avrebbe bisogno di DPot firmware modifiche della ICD OS. Il vecchio sistema operativo non avrebbe funzionato in quella nuova. Questa potrebbe essere la causa che la DLL è il controllo della versione. |
|
| Torna a inizio pagina | |
 |
Zedman
Iscritto il: 13 ottobre 2003 Interventi: 294 Contribuito: 2
| 05 apr 2006 22:32 Progetto per sostituire CY7C64613 nel ICD2 | | | tag: MPLAB protocollo icd2 icd2w2k.sys icd2w2k scaricare 4550 bootloader scrivere icd2w2k.sys download download icd2w2k |
|
| Credo che non si dovrebbe trattare con nulla per quanto riguarda il circuito o protocollo o connessione tra 877 e 4550 ancora. Penso che tutti abbiamo bisogno è scritto nel 4550 bidoni forniti con MPLAB. Dobbiamo scrivere un bootloader compatibile con il icd2w2k.sys per ottenere il OS.bin scaricato, e dopo che possiamo scracth nostre teste come la 877 è collegato.
Aggiunto dopo 5 minuti:
In ICD2br usa un altro tipo di chip che genera la Vpp. Rkodaira mentoined, verificare i posti prima. |
|
| Torna a inizio pagina | |
 |
silvio
Iscritto il: 31 dicembre 2001 Interventi: 800 Contribuito: 90
| 06 aprile 2006 2:36 Re: Progetto di sostituire CY7C64613 nel ICD2 | | | tags: icd2w2k.sys icd2w2k download 4550 bootloader write icd2w2k.sys download download icd2w2k |
|
| | Zedman wrote: | We should write a bootloader compatible with the icd2w2k.sys to get the OS.bin downloaded.
|
Yes, this is the main reason for which I said that dissasembling CY fw it's useless as long as we have the OS and BL bin file provided by Microchip. To start coding from scratch for 4550 and simulate the CY fw would be time consuming and worthless. That's I appreciate zedman's efforts.
However sometimes I can't help myself to ask this stupid question : If the BL cannot be upgraded while it's active, what was Microchip's ICD2 designers approach for upgrade ? In parallel programmer before soldering 4550 ? Or through ICSP with a clean bin image downloaded after boot block erased ? If rkodaira will find that CPB and EBTRB bits are cleared , then how can OS.bin be loaded in 4550 ? I start asking like you : why did they supplied the boot image ? Or, as Jay.slovak said "the string is readable, just the code does nothing" because it's encrypted and makes sense only for original boot code. So, the only solution is to simulate the 4550's bootloader and get the mirror bin image of OS ? |
|
| Back to top | |
 |
albert22
Joined: 20 Jul 2004 Posts: 95 Helped: 3
| 06 Apr 2006 4:36 Re: Project to replace CY7C64613 in the ICD2 | | | tags: mplab protocol icd2 |
|
| | Quote: | In ICD2br uses another kind of chip which generates the Vpp. Rkodaira mentoined, check the posts before.
| I didnt mean the MIC2175, which is a switching regulator as the MC34063. I was aiming at the DPOT and specifically to its I2C interfase because it requires the support of the firmware in the 877 to set the correct Vpp voltage. As I said before if the new ICD2 relies in other component to change the Vdd, all the firmware needs to change.
May be Rkodaira could check ithe circuit associated with pin 3 (FB) of the MIC2172 to see if vpp can be controlled or it is fixed.
Let me make my statement a little clear. If the Brazilian ICD has no control of Vpp it is highly probable that it is just a clone. In that case there is no warranty that the real new ICD2 is based on a 4550 and a 877. It could be just a 4450 alone for example (why not) in that case the following statement would not be true. | Quote: | | I think ALL we need is written in the 4550 bins supplied with MPLAB. | As we dont know for sure the arquitecture of the new ICD we need to emulate the CY. However chances are that the 4550BINs will still be usefull to solve the USB protocol. I tried to disassemble it today but found nothing coherent yet.
To the question: | Quote: | | why did they supplied the boot image ? | They supplied the BL010101.hex which needs to be programmed at the factory for the ICD to work.[/quote] |
|
| Back to top | |
 |
Zedman
Joined: 13 Oct 2003 Posts: 294 Helped: 2
| 06 Apr 2006 11:48 Re: Project to replace CY7C64613 in the ICD2 | | | tags: icd2 load hex command |
|
| Silvio,
the BL cannot be upgraded thing was a little trick. Actually MPLAB is set to check the BL's version against 0xFFFF, and if 0xFFFF (it's only a word) is lower than it will try to upgrade the bootloader. So it wont ever get here, because larger number than 0xFFFF cannot be set on a word. So I patched it to skip this test and try to do it, but anyway it's a BUILT IN function in MPLAB! It CAN update the boot image too. I just patched the version check out. But think: it's not accidentaly set to 0xFFFF, they may not want to use this function yet. According to the OS.bin file, if the product version is 0x0010 than it's downloaded all the time. Maybe 0x0010 is the BL's version only, and set to lower when OS will run in it! The OS.bin's version is also checked against 0xFFFF. If it's equals to 0xFFFF it's starts the checking for the BOOT.bin file as I mentoined above.
I'll check how it handles the active check when it complains about "it cannot be upgraded while active".
Another strange thing is if the original bootloader handles the decryption of the OS.bin image, than it will be a nice thing to clone... Anyway there is no processing on the .bin files in the software as I saw.
the DeviceIOControl command returns 0x57: The parameter is incorrect. (ERROR_INVALID_PARAMETER)
If we get the OS.bin downloaded than we can read it back with another icd2 and see how it works.
Albert,
they wont change the 877 firmware. They have a lot of hexs supplied with MPLAB should work with both versions. They may do minor changes, but thats all. Sorry I misunderstood that DPOT thing. The question "Why they supplied the boot image?" I asked was for the 4550_boot.bin file. |
|
| Back to top | |
 |
rkodaira
Joined: 08 Jun 2004 Posts: 332 Helped: 54 Location: Sao Paulo - Brasil
| 06 Apr 2006 14:19 Re: Project to replace CY7C64613 in the ICD2 | | |
|
| Hi guys !
Bad news. I could not install the USB monitor in my PC with Windows98SE, because it doesn´t accept to be installed. I think it (if installed) wouldn´t make any damage to my ICD2, but i could not test it.
About the Vpp control, I think that there is only the high voltage generator for Vpp and there is another way to control this voltage. I don´t know if the DG411 has this role, and there is a power mosfet also in the circuit.
I don´t think my clone is the new ICD2 from Microchip. I suppose the local manufacturer only made a clone using more available parts and making some changes in the firmware to adequate the new parts. Sorry I cannot make any attempt to read the 18F4550 contents.
Added after 15 minutes:
One more thing:
I tried to build the PICKIT2 programmer (onlu the basic part: the PIC, crystal and some connections) some weeks ago. It has the schematic and "all" the software available for download in the Microchip pages. I bought some 18F2550 and programmed with the firmware provided. I installed the programmer software and connected the hardware to the USB port. The PC recognized it once but the software did not. I think that there is something missing in the package, that blocks the programmer to communicate with the software. Could be the same case be happening with the hex files provided for the ICD2 ? Or in other words: Microchip does´t provide the complete code for the ICD2. |
|
| Back to top | |
 |
albert22
Joined: 20 Jul 2004 Posts: 95 Helped: 3
| 06 Apr 2006 18:26 Re: Project to replace CY7C64613 in the ICD2 | | |
|
| Please Can somebody export to .txt the USB log files captured by HDD monitor? I cannot install this soft at my home. Otherwise Ill have to wait until next week to read them on my PC at work. I am now studying the protocol between the CY and the 877 OS. If they are too big. A connect log, and a program log would be nice. Thanks |
|
| Back to top | |
 |
Kripton2035
Joined: 19 Jul 2001 Posts: 482 Helped: 15 Location: Earth
| 06 Apr 2006 19:31 Re: Project to replace CY7C64613 in the ICD2 | | |
|
| | rkodaira wrote: | Hi guys ! Bad news. I could not install the USB monitor in my PC with Windows98SE, because it doesn´t accept to be installed. I think it (if installed) wouldn´t make any damage to my ICD2, but i could not test it.
|
may be you can try this one : they say it works under w98... http://www.perisoft.net/bushound/
zedman needs a log of a real 4550... my cypress clone doesnt give all he needs... |
|
| Back to top | |
 |
Zedman
Joined: 13 Oct 2003 Posts: 294 Helped: 2
| 06 Apr 2006 20:14 Project to replace CY7C64613 in the ICD2 | | |
|
| | It can be exported from USBMon to HTML format, but I have only serial ICD2. |
|
| Back to top | |
 |
Brem
Joined: 06 Apr 2006 Posts: 36
| 06 Apr 2006 20:22 Re: Project to replace CY7C64613 in the ICD2 | | | tags: mplab protocol icd2 icd2 load hex command |
|
| Hi group,
Zedman drew my attention to this thread. I find it very interesting.
Last winter my hobby project was to build an ICD clone on a 2455/2550. I used the CDC firmware for RS232 emulation to connect to MPLAB. I disassambled the 877 firmware and made it more readable with a VB program. As far as I can tell the protocol CY<->877 and the protocol RS232<->877 are the same. There are no USB specific things in the 877 firmware.
I'll try to explain what I learned of the protocol.
MPLAB starts a connection by sending a 'Z'. ICD should reply with some kind of version nr in binary: 0x01,0x01,0x03.
Now MPLAB sends a 'V' if it wants to connect to the bootloader, ICD should reply with a 'v' 'U' if it wants to connect to the OS, ICD should reply 'u'
Next is the version of the ICD hardware, this has to be compatible with the old ICD1, so its different from all other commands: MPLAB send '$7F00\r', ICD replies '02' for ICD2
From here on all commands are send in packets in the form: '<', packet len, command, [params], checksum, '>' all items are sent in hex, packet length is including the <>. An example: '<0801C9>', len=8, cmd=1 (GETFIRMWAREVERSION), no params, checksum=0xC9
Reply's to commands are in the same form, except packed in []. Reply to the above example would be: '[0E0102630102]', len=14, cmd=1 (GETFIRMWAREVERSION), param 2.99.1, checksum=0x02.
Large chunks of data are sent in {} packets : {data [,data..], checksum}. For example the write program command: MPLAB: <184300005DC000000120FF>, len 24, cmd=0x43 (WRITEPROGRAM), program size= 0x05DC, start address=0x0120, checksum = 0xFF ICD: [0843CF], len 8, cmd 0x43, checksum 0xCF MPLAB: {FF3FFF3F.....3C} , data data data.., checksum-0x3C ICD: [0843CF], ack cmd 0x43 again
I used the information from this thread to connect my existing program with the real ICD USB Driver. I got so far that I receive the GETFIRMWAREVERSION command, but my response seems not to be understood. It sends the same command again and then hangs (?) . |
|
| Back to top | |
 |
albert22
Joined: 20 Jul 2004 Posts: 95 Helped: 3
| 06 Apr 2006 23:17 Re: Project to replace CY7C64613 in the ICD2 | | |
|
| | Quote: | | It can be exported from USBMon to HTML format, but I have only serial ICD2. | Zedman may be you can open the log files that had been posted here and export them to html. No need to have the USB ICD2.
Brem, Great. I was just at the routines that handle connection with the ICD once the OS is loaded. Thanks. |
|
| Back to top | |
 |
Zedman
Joined: 13 Oct 2003 Posts: 294 Helped: 2
| 06 Apr 2006 23:29 Re: Project to replace CY7C64613 in the ICD2 | | | tags: mplbcomm.dll |
|
| Hey Brem!
nice to see you here! Thanks for the infos on the protocol.
| Quote: | I used the information from this thread to connect my existing program with the real ICD USB Driver. I got so far that I receive the GETFIRMWAREVERSION command, but my response seems not to be understood. It sends the same command again and then hangs (?) .
|
would you please explain this a bit more? What's that mean you response is not understood? You got an usb packet starting with 0x01, replied it succesfully and just the content was wrong?
Please explain this, because as you can see from the thread Iam stuck with the replying. 
-------------------
Iam now trying an alternate way to **** with the replying thing, I wrote a small program in Delphi to test if the reply works, getting the same results yet but it's faster than switching the programmer in mplab while using it too.
here is the proc (values got from disassembled/debugged MPLBCOMM.dll): | Code: | procedure TForm1.Button1Click(Sender: TObject); var hnd: cardinal; InBuffer: array[0..3] of byte; OutBuffer: array[0..17] of byte; bytesReturned: cardinal; a: integer; begin hnd:=CreateFile('\\.\i3kmc-0', $C0000000, 2, 0, 3, 0, 0);
if hnd <> INVALID_HANDLE_VALUE then begin // get usb descriptor for a:=0 to 3 do InBuffer[a]:=0; for a:=0 to 17 do OutBuffer[a]:=0; bytesReturned:=0; if (DeviceIoControl(hnd, $0A4122404, @InBuffer, 4, @OutBuffer, $12, bytesReturned, nil)) then begin Memo1.Lines.Add('1 OK'); end;
// write command for a:=0 to 3 do InBuffer[a]:=0; for a:=0 to 17 do OutBuffer[a]:=0; bytesReturned:=0; OutBuffer[0]:=3; if (DeviceIoControl(hnd, $0A4122451, @InBuffer, 4, @OutBuffer, $12, bytesReturned, nil)) then begin Memo1.Lines.Add('2 OK'); end;
// get status for a:=0 to 3 do InBuffer[a]:=0; for a:=0 to 17 do OutBuffer[a]:=0; bytesReturned:=0; InBuffer[0]:=7; if (DeviceIoControl(hnd, $0A412244E, @InBuffer, 4, @OutBuffer, 0, bytesReturned, nil)) then begin Memo1.Lines.Add('3 OK'); end; Memo1.Lines.Add('- done.'); end; end;
|
the 3rd DeviceIOControl returns failed.
I can't even remeber how my wife look like... |
|
| Back to top | |
 |
Brem
Joined: 06 Apr 2006 Posts: 36
| 07 Apr 2006 0:31 Re: Project to replace CY7C64613 in the ICD2 | | |
|
| Hi Zedman,
Besides some recognizable data like the 'Z', the 'U' and <0801C9>, I receive packets I don't understand. They are all 18 bytes long, 1st char is 0x00,0x01 or 0x02, 2nd char seems to be some kind of seq.nr, 3rd byte a length.
First packet received is: HOST->DEV: 02 C1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 I reply with 8 x 0 DEV->HOST: 00 00 00 00 00 00 00 00 00 Second packet received is: HOST->DEV: 01 C2 01 00 00 00 00 00 00 00 C9 00 00 00 00 00 00 00 Here the first byte 0x01 seems to mean "data incoming", 3rd bytes undicates length. I dont send reply on this packet. Next rcvd is a singe 'Z', I reply with the hardware version HOST->DEV: 5A DEV->HOST: 01 01 03 Next again a packet starting with 0x02, same reply HOST->DEV: 02 C1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 DEV->HOST: 00 00 00 00 00 00 00 00 00 then a "data incoming" packet folowed by a 'U', connect to OS HOST-DEV: 01 C2 01 00 00 00 00 00 00 00 C9 00 00 00 00 00 00 00 HOST-DEV: 55 Now MPLAB seems to want 8 bytes so I send a 'u' with 7 zeros DEV->HOST: 75 00 00 00 00 00 00 00
Now comes the tricky part. A packet starting with 0x02 means MPLAB wants data on EP2. HOST-DEV: 02 C3 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 DEV-HOST (on EP2!!): 75 DEV-HOST (on EP1): 00 00 00 00 00 00 00 00
And here I get stuck at the moment. MPLAB sends a <0801C9> but my response is ignored. I think from here on the ICD should send all data over EP2. |
|
| Back to top | |
 |
Zedman
Joined: 13 Oct 2003 Posts: 294 Helped: 2
| 07 Apr 2006 10:51 Project to replace CY7C64613 in the ICD2 | | |
|
| Brem,
Iam a lamer. PLEASE TELL ME how do you reply? How the hell does it work for you? What am I missing? If I set up the shared ram with 0s set the Cnt to 8 and set UOWN bit to SIE, MPLAB wont send me ANY more data, and UOWN never get cleared!! But from this I see u managed it to work!!!
HELP ME PLEASE!
| Code: | HOST->DEV: 02 C1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 I reply with 8 x 0 DEV->HOST: 00 00 00 00 00 00 00 00 00
|
|
|
| Back to top | |
 |