| Penulis | Pesan |
|---|
Kripton2035
Bergabung: 19 Jul 2001 Posts: 482 Helped: 15 Lokasi: Bumi
| 03 Apr 2006 8:28 Re: Proyek untuk menggantikan CY7C64613 di ICD2 | | |
|
| | predrage wrote: | Teman-teman saya tidak berhasil dalam program ICD2_4550_BOOT_0180.BIN ke 4550. I'v mencoba untuk membuka file dengan bin winpic 800 software tetapi gagal. I tryed untuk membukanya dengan opsi "semua file" dalam "jenis file" karena tidak ada dukungan langsung untuk bin file. ICprog ada yang mendukung (untuk membuka file bin) tetapi tidak dapat program 4550. Sebenarnya tidak ada 4550 dalam daftar perangkat. Apa yang harus saya lakukan selanjutnya? Any suggestions? I'm just a beginner tapi ada baik akan membantu. Sorry about my bad Inggris. |
mengubah nama. BIN ke. Hex dan winpic akan membukanya! kadang-kadang banyak file-file tersebut. BIN kenyataannya adalah intel. hex! untuk memastikan, buka file dengan notepad, jika berisi baris diawali dengan ":" kemudian untuk mengubah nama. heksa dan membukanya dengan winpic .. if it's sampah, maka bin2hex harus digunakan untuk membukanya. |
|
| Kembali ke atas | |
 |
narccizzo
Bergabung: 20 Jan 2006 Posts: 173 Helped: 4 Lokasi: PATZCUARO, Michoacan, MEKSIKO
| 03 Apr 2006 9:42 Re: Proyek untuk menggantikan CY7C64613 di ICD2 | | |
|
| Ini adalah dua file bin dikonversi ke hex, saya telah membuka file bin dengan ic-prog software maka saya menyimpan file dalam format hex, jika anda melihat ke file-file ini anda dapat melihat dibaca string "microchip Tecnology ICD2 USB Device icd2 usb" pada alamat 0x0ee7 untuk boot.hex file dan string yang sama di 0x0b8e untuk os.hex file, i dont have a disassembler untuk mencari lebih detail file ini, tetapi sesuatu yang memberitahu saya bahwa kedua file yang kita butuhkan.
BR Narccizzo
|
|
| Kembali ke atas | |
 |
Jay.slovak
Bergabung: 23 Mar 2006 Posts: 11
| 03 Apr 2006 11:17 Re: Proyek untuk menggantikan CY7C64613 di ICD2 | | |
|
| | narccizzo wrote: | Ini adalah dua file bin dikonversi ke hex, saya telah membuka file bin dengan ic-prog software maka saya menyimpan file dalam format hex, jika anda melihat ke file-file ini anda dapat melihat dibaca string "microchip Tecnology ICD2 USB Device icd2 usb" pada alamat 0x0ee7 untuk boot.hex file dan string yang sama di 0x0b8e untuk os.hex file, i dont have a disassembler untuk mencari lebih detail file ini, tetapi sesuatu yang memberitahu saya bahwa kedua file yang kita butuhkan.
BR Narccizzo |
Apakah Anda yakin telah diubah file dengan benar? Jika saya menjadi mereka impor MPLAB, kode tidak masuk akal, semua itu tidak hanya terjadi melalui Program memori dan melakukan NOPs. Tidak ada yang bermanfaat yang terjadi di kedua Boot dan OS HEXs. Bahkan bit konfigurasi yang berbeda dalam kedua file! |
|
| Kembali ke atas | |
 |
Zedman
Bergabung: 13 Oktober 2003 Posts: 294 Helped: 2
| 03 Apr 2006 11:19 Proyek untuk menggantikan CY7C64613 di ICD2 | | |
|
| albert,
kernel driver (s) mengharapkan, The Cypress akan menghubungkan pada berbagai vid / pid firt ketika tersambung, dan setelah loader sys download it's fw akan kembali sebagai vid / pid sehingga sys lainnya berbicara kepadanya. Kita harus melaksanakan yang kedua hanya satu. Iam @ bekerja sehingga saya tidak bisa berbuat apa-apa di sini mengharapkan keras thinkin ' ... |
|
| Kembali ke atas | |
 |
Silvio
Bergabung: 31 Desember 2001 Posts: 800 Helped: 90
| 03 Apr 2006 11:31 Re: Proyek untuk menggantikan CY7C64613 di ICD2 | | | tag: mplab protokol icd2 Cypress disassembler disassembler Cypress |
|
| Hi Zedman,
it's a must to understand what's under cover. Tentang Cy hex file itu tidak hanya suatu hal yang baik disassembler yang mengetahui Cypress keping, namun membaca dari 436 halaman EZ-USB FX TechRefManual it's a harus memahami apa yang di bawah penutup. Dan saya tidak yakin Anda saat ini. Namun demikian, jika Anda tidak akrab dengan 8051 opcodes, parsing kode akan memakan waktu lama. (I know you're familar dengan orang PIC) with appropiate values from CY7C64613 registers 0x7800-0x7FFF but you'll definitely end up turning the pages of TechRefManual looking for definitions. Saya dapat mengganti semua terjadinya MOV DPTR, # LXXXX sesuai dengan nilai-nilai dari CY7C64613 register 0x7800-0x7FFF namun Anda pasti akan berakhir kembali halaman TechRefManual mencari definisi. Selain itu beberapa cara ini akan sulit untuk menetapkan nama bit yang diatur atau jelas dalam program selama mereka tidak dipetakan di ruang SFR (yang berakhir 0 atau 8). with MOV DPTR, #EP0CS but it's difficult to say SETB HSNAK due to the above reasons. Sangat mudah untuk mengganti MOV DPTR, # L7FB4 dengan MOV DPTR, # EP0CS tetapi sulit untuk mengatakan SETB HSNAK karena alasan di atas.
and EP0STAL L which are affected in the bellow code at 0x03E2. Mari kita mengambil contoh bit HSNAK dan L EP0STAL yang terpengaruh di bawah kode di 0x03E2. | Kode: | L03E2: LCALL L0FBE JNC L03EE MOV DPTR, # L7FB4 MOVX A, @ DPTR ORL A, # 01h; beberapa jenis SETB EP0STALL MOVX @ DPTR, A L03EE: MOV DPTR, # L7FB4 MOVX A, @ DPTR ORL A, # 02h; beberapa jenis SETB HSNAK MOVX @ DPTR, A Ret
L0FBE: SETB C Ret
|
Untuk mengambil contoh (CP_1.asm) kode baris dimulai dengan offset 0x0100 (a subroutine disebut dari 0x05FA), kode baris pertama digunakan immediatelly bawah tabel interrupt vector Pada RAM 0x7FE9 Anda dapat menemukan 2. Byte dari 8 byte USB SETUP paket data (lihat halaman 215 table9-1), yang berarti bRequest bidang (lihat tabel 9-2).
| Kode: | L0100: MOV DPTR, # L7FE9 MOVX A, @ DPTR JNZ L0109 LJMP L029B, jika bRequest = GetStatus langsung ke 0x029B L0109: DEC J JNZ L010F LJMP L0317, jika bRequest = Hapus Fitur, melompat ke 0x0317 L010F: ADD A, # 0FEh JNZ L0116 LJMP L038E, jika bRequest = Atur Fitur, melompat ke 0x038E L0116: ADD A, # 0FBh JNZ L011D LJMP L0295, jika bRequest = Konfigurasi Dapatkan, melompat ke 0x0295 L011D: DEC J JNZ L0123 LJMP L028F, jika bRequest = Atur konfigurasi, melompat ke 0x028F L0123: DEC J JNZ L0129 LJMP L0283, jika bRequest = Dapatkan Interface, melompat ke 0x0283 L0129: DEC J JNZ L012F LJMP L0289, jika bRequest = Atur Interface, melompat ke 0x0289 L012F: ADD A, # 05h JZ L0136 LJMP L03E2; bRequest = jika tidak ada di atas, maka ditetapkan HSNAK bit ; dan EP0STALL dari EP0CS kontrol & mendaftar dan status ;then RET at 0x05FD ; L0136: LCALL L0F7A, jika bRequest = Dapatkan keterangan, LCALL 0x0F7A dimana JC L013E; membawa sedikit diatur secara default, sehingga langsung ke 0x013E LJMP L03EE, jika di 0x0F7A akan membawa 0 secara default, atur bit HSNAK ; EP0CS dari kontrol & status mendaftar dan Ret di 0x05FD ; L013E: MOV DPTR, # L7FEB; disini adalah karena bRequest Dapatkan keterangan MOVX A, @ DPTR; demikian, periksa WValueH bidang SETUP paket USB ADD A, # 0FEh JZ L015F, jika wValueH adalah 0x02 langsung ke 0x015F DEC A JZ L0190, jika wValueH adalah 0x03 langsung ke 0x0190 ADD A, # 02h JZ L0150, jika wValueH adalah 0x01 langsung ke 0x0150 LJMP L0279, jika wValueh berbeda baik dari 0x01 atau 0x02 atau 0x03 kemudian menetapkan ; bit HSNAK dan EP0STALL dari EP0CS mendaftar dan Ret di 0x05FD ; L0150: MOV A, 0Ch; di sini karena wValueH adalah 0x01, jadi beban SUDPTR global USB mendaftar MOV DPTR, # L7FD4; dengan nilai 0x0C0D, kemudian menetapkan HSNAK sedikit dari EP0CS dan Ret di 0x05FD MOVX @ DPTR, A MOV A, 0Dh MOV DPTR, # L7FD5 MOVX @ DPTR, A LJMP L03EE L015F: MOV DPTR, # L7FEA; lihat sekarang di bidang wValueL USB SETUP paket ; ; ; ; , dan seterusnya ...................
|
port2: Microchip MPLAB ICD2 Fw client Atau ini tabel di offset 0x0622 yang cocok dengan Kripton2035 port2: microchip MPLAB ICD2 FW klien
| Kode: | Tabel 5-9. Default USB Device keterangan
RAM Nilai Offset Field Deskripsi
0622 0x12 0 bLength Lama ini keterangan = 18 byte 0623 0x01 1 bDescriptorType keterangan Jenis = Device 0624 0x00 2 bcdUSB (L) USB Spesifikasi Versi 1,10 (L) 0625 0x01 3 bcdUSB (H) USB Spesifikasi Versi 1,10 (H) 0626 0xFF Kelas 4 bDeviceClass Device (FF adalah Vendor-Khusus) 0627 0xFF 5 bDeviceSubClass Device Sub-Kelas (FF adalah Vendor-Khusus) 0628 0xFF 6 bDeviceProtocol Device Protocol (FF adalah Vendor-Khusus) 0629 0x40 7 bMaxPacketSize0 Ukuran Maksimum paket untuk EP0 = 64 byte 062A 0xD8 8 idVendor (L) Vendor ID (L) microchip Teknologi = 04D8H 062B 0x04 9 idVendor (H) Vendor ID (H) 062C 0x01 10 idProduct (L) Produk ID (L) ICD2 = 8001H 062D 0x80 11 idProduct (H) Produk ID (H) 062E 0x03 12 bcdDevice (L) Release Pajak Device (BCD, L) 062F 0x00 13 bcdDevice (H) Release Pajak Device (BCD, H) 0630 0x00 14 iManufacturer Produsen Indeks String = None 0631 0x00 15 iProduct Produk Indeks String = None 0632 0x00 16 iSerialNumber Nomor Seri Indeks String = None 0633 0x01 17 bNumConfigurations Jumlah Konfigurasi ini Interface = 1
Tabel 5-10. USB default Konfigurasi keterangan
RAM Nilai Offset Field Deskripsi
0634 0x09 0 bLength Lama ini keterangan = 9 byte 0635 0x02 1 bDescriptorType keterangan Jenis = Konfigurasi 0636 0x74 2 wTotalLength (L) Jumlah Panjang (L) Termasuk Antarmuka dan Endpoint descriptors = 116 0637 0x00 3 wTotalLength (H) Total Panjang (H) 0638 0x01 4 bNumInterfaces Jumlah ini Konfigurasi antarmuka 0639 0x01 5 bConfigurationValue Konfigurasi Nilai Digunakan oleh Set_Configuration Permintaan ini ke Pilih Konfigurasi 063A 0x00 6 iConfiguration Index of String ini menjelaskan konfigurasi = None 063B 0x80 7 bmAttributes Atribut - Bus-Powered, No Wakeup 063C 0x4B 8 MaxPower Maksimum Power - 150 mA
Tabel 5-11. USB Interface default 0, alternatif Pengaturan 0 keterangan
RAM Nilai Offset Field Deskripsi
063D 0x09 0 bLength Panjang dari Interface keterangan 063E 0x04 1 bDescriptorType keterangan = Jenis Antarmuka 063F 0x00 2 bInterfaceNumber Zero berbasis Indeks ini Interface = 0 0640 0x00 3 bAlternateSetting alternatif Menentukan Nilai = 0 0641 0x0E 4 bNumEndpoints Jumlah Endpoints ini Interface (Tidak Counting EPO) = 14 0642 0xFF 5 bInterfaceClass Interface = Vendor Kelas Khusus 0643 0xFF 6 bInterfaceSubClass Interface Sub-class = Vendor Khusus 0644 0xFF 7 bInterfaceProtocol Interface Protocol = Vendor Khusus 0645 0x00 8 iInterface Indeks ke String keterangan ini untuk Interface = None
Tabel 5-14. Interface default 0, Menentukan alternatif 1, Massal Endpoint descriptors
RAM Nilai Offset Field Deskripsi
0646 0x07 0 bLength Lama ini Endpoint keterangan 0647 0x05 1 bDescriptor Jenis Jenis keterangan = Endpoint 0648 0x01 2 bEndpointAddress Endpoint Arah (1 dalam) dan Alamat = OUT1 0649 0x02 3 bmAttributes XFR Jenis Massal = 064A 0x40 4 wMaxPacketSize (L) Ukuran Maksimum paket = 64 Bytes 064B 0x00 5 wMaxPacketSize (H) maksimum paket Ukuran - Tinggi 064C 0x01 6 bInterval Polling jarak dalam milidetik
064D 0x07 0 bLength Lama ini Endpoint keterangan 064E 0x05 1 bDescriptor keterangan Jenis Jenis = Endpoint 064F 0x02 2 bEndpointAddress Endpoint Arah (1 dalam) dan Alamat = OUT2 0650 0x02 3 bmAttributes XFR Jenis Massal = 0651 0x40 4 wMaxPacketSize (L) Ukuran Maksimum paket = 64 Bytes 0652 0x00 5 wMaxPacketSize (H) maksimum paket Ukuran - Tinggi 0653 0x01 6 bInterval Polling jarak dalam milidetik
0654 0x07 0 bLength Lama ini Endpoint keterangan 0655 0x05 1 bDescriptor Jenis Jenis keterangan = Endpoint 0656 0x03 2 bEndpointAddress Endpoint Arah (1 dalam) dan Alamat = OUT3 0657 0x02 3 bmAttributes XFR Jenis Massal = 0658 0x40 4 wMaxPacketSize (L) Ukuran Maksimum paket = 64 Bytes 0659 0x00 5 wMaxPacketSize (H) maksimum paket Ukuran - Tinggi 065A 0x01 6 bInterval Polling jarak dalam milidetik
065B 0x07 0 bLength Durasi ini Endpoint keterangan 065C 0x05 1 bDescriptor keterangan Jenis Jenis = Endpoint 065D 0x04 2 bEndpointAddress Endpoint Arah (1 dalam) dan Alamat = OUT4 065E 0x02 3 bmAttributes XFR Jenis Massal = 065F 0x40 4 wMaxPacketSize (L) Ukuran Maksimum paket = 64 Bytes 0660 0x00 5 wMaxPacketSize (H) maksimum paket Ukuran - Tinggi 0661 0x01 6 bInterval Polling jarak dalam milidetik
0662 0x07 0 bLength Lama ini Endpoint keterangan 0663 0x05 1 bDescriptor Jenis Jenis keterangan = Endpoint 0664 0x05 2 bEndpointAddress Endpoint Arah (1 dalam) dan Alamat = OUT5 0665 0x02 3 bmAttributes XFR Jenis Massal = 0666 0x40 4 wMaxPacketSize (L) Ukuran Maksimum paket = 64 Bytes 0667 0x00 5 wMaxPacketSize (H) maksimum paket Ukuran - Tinggi 0668 0x01 6 bInterval Polling jarak dalam milidetik
0669 0x07 0 bLength Lama ini Endpoint keterangan 066A 0x05 1 bDescriptor keterangan Jenis Jenis = Endpoint 066B 0x06 2 bEndpointAddress Endpoint Arah (1 dalam) dan Alamat = OUT6 066C 0x02 3 bmAttributes XFR Jenis Massal = 066D 0x40 4 wMaxPacketSize (L) Ukuran Maksimum paket = 64 Bytes 066E 0x00 5 wMaxPacketSize (H) maksimum paket Ukuran - Tinggi 066F 0x01 6 bInterval Polling jarak dalam milidetik
0670 0x07 0 bLength Lama ini Endpoint keterangan 0671 0x05 1 bDescriptor Jenis Jenis keterangan = Endpoint 0672 0x07 2 bEndpointAddress Endpoint Arah (1 dalam) dan Alamat = OUT7 0673 0x02 3 bmAttributes XFR Jenis Massal = 0674 0x40 4 wMaxPacketSize (L) Ukuran Maksimum paket = 64 Bytes 0675 0x00 5 wMaxPacketSize (H) maksimum paket Ukuran - Tinggi 0676 0x01 6 bInterval Polling jarak dalam milidetik
RAM Nilai Offset Field Deskripsi
0677 0x07 0 bLength Lama ini Endpoint keterangan 0678 0x05 1 bDescriptor Jenis Jenis keterangan = Endpoint 0679 0x81 2 bEndpointAddress Endpoint Arah (1 dalam) dan Alamat = IN1 067A 0x02 3 bmAttributes XFR Jenis Massal = 067B 0x40 4 wMaxPacketSize (L) Ukuran Maksimum paket = 64 Bytes 067C 0x00 5 wMaxPacketSize (H) maksimum paket Ukuran - Tinggi 067D 0x01 6 bInterval Polling jarak dalam milidetik
067E 0x07 0 bLength Lama ini Endpoint keterangan 067F 0x05 1 bDescriptor keterangan Jenis Jenis = Endpoint 0680 0x82 2 bEndpointAddress Endpoint Arah (1 dalam) dan Alamat = IN2 0681 0x02 3 bmAttributes XFR Jenis Massal = 0682 0x40 4 wMaxPacketSize (L) Ukuran Maksimum paket = 64 Bytes 0683 0x00 5 wMaxPacketSize (H) maksimum paket Ukuran - Tinggi 0684 0x01 6 bInterval Polling jarak dalam milidetik
0685 0x07 0 bLength Lama ini Endpoint keterangan 0686 0x05 1 bDescriptor Jenis Jenis keterangan = Endpoint 0687 0x83 2 bEndpointAddress Endpoint Arah (1 dalam) dan Alamat = IN3 0688 0x02 3 bmAttributes XFR Jenis Massal = 0689 0x40 4 wMaxPacketSize (L) Ukuran Maksimum paket = 64 Bytes 068A 0x00 5 wMaxPacketSize (H) maksimum paket Ukuran - Tinggi 068B 0x01 6 bInterval Polling jarak dalam milidetik
068C 0x07 0 bLength Lama ini Endpoint keterangan 068D 0x05 1 bDescriptor Jenis Jenis keterangan = Endpoint 068E 0x84 2 bEndpointAddress Endpoint Arah (1 dalam) dan Alamat = IN4 068F 0x02 3 bmAttributes XFR Jenis Massal = 0690 0x40 4 wMaxPacketSize (L) Ukuran Maksimum paket = 64 Bytes 0691 0x00 5 wMaxPacketSize (H) maksimum paket Ukuran - Tinggi 0692 0x01 6 bInterval Polling jarak dalam milidetik
0693 0x07 0 bLength Lama ini Endpoint keterangan 0694 0x05 1 bDescriptor Jenis Jenis keterangan = Endpoint 0695 0x85 2 bEndpointAddress Endpoint Arah (1 dalam) dan Alamat = IN5 0696 0x02 3 bmAttributes XFR Jenis Massal = 0697 0x40 4 wMaxPacketSize (L) Ukuran Maksimum paket = 64 Bytes 0698 0x00 5 wMaxPacketSize (H) maksimum paket Ukuran - Tinggi 0699 0x01 6 bInterval Polling jarak dalam milidetik
069A 0x07 0 bLength Lama ini Endpoint keterangan 069B 0x05 1 bDescriptor Jenis Jenis keterangan = Endpoint 069C 0x86 2 bEndpointAddress Endpoint Arah (1 dalam) dan Alamat = IN6 069D 0x02 3 bmAttributes XFR Jenis Massal = 069E 0x40 4 wMaxPacketSize (L) Ukuran Maksimum paket = 64 Bytes 069F 0x00 5 wMaxPacketSize (H) maksimum paket Ukuran - Tinggi 06A0 0x01 6 bInterval Polling jarak dalam milidetik
06A1 0x07 0 bLength Lama ini Endpoint keterangan 06A2 0x05 1 bDescriptor keterangan Jenis Jenis = Endpoint 06A3 0x87 2 bEndpointAddress Endpoint Arah (1 dalam) dan Alamat = IN7 06A4 0x02 3 bmAttributes XFR Jenis Massal = 06A5 0x40 4 wMaxPacketSize (L) Ukuran Maksimum paket = 64 Bytes 06A6 0x00 5 wMaxPacketSize (H) maksimum paket Ukuran - Tinggi 06A7 0x01 6 bInterval Polling jarak dalam milidetik
yang kemudian diikuti oleh unicode bentuk string nol berakhir "Microchip Teknologi ICD2 USB Device"
|
Namun jika Anda buntu bin dengan 4550, saya dapat mencoba untuk membantu dengan menambahkan komentar di dalam file Cy ASM. |
|
| Kembali ke atas | |
 |
Zedman
Bergabung: 13 Oktober 2003 Posts: 294 Helped: 2
| 03 Apr 2006 17:10 Re: Proyek untuk menggantikan CY7C64613 di ICD2 | | | tag: icd2.dll |
|
| Hi Silvio,
thanks for the infos, LONG waktu lalu saya harus mem-parsing file bin yang datang dari sebuah chip eprom. Aku tidak pernah bahkan tidak prosesor jenis maupun sirkuit. Tetapi saya harus menemukan cara berurusan dengan kartu memori, dan data. Saya diasumsikan it's a 8051 jenis chip dan mencoba banyak disassemblers, dan berakhir sampai dengan 80C542 (i cant remember which one was it exactly) I figured it out dari pelabuhan nomor kode dan bagaimana berurusan dengan individu port pin. Tapi itu 2 bulan bekerja siang dan malam bagi saya, banyak membaca / debug / belajar. Itulah mengapa saya ingin assembler apa yang mampu untuk melakukan hal yang disebutkan sebagai gantinya saya ...  Thanks again Silvio.
-----------------------------
Iam mulai yakin semua, menurut bin file. Saya melakukan penelitian di ICD2 dll dan menemukan bahwa panggilan GETUSBDESCRIPTOR dan memeriksa nomor dalam keterangan dan jika sesuai versi yang lebih baru daripada ICD2 saya masuk saya 4550 keterangan dari daripada suatu send4550image panggilan! Dan juga ada di descriptors bin file sama dengan satu Kripton upload. Satu hal yang saya tidak mengerti apa yang mereka disertakan boot image? Dan mengapa ICD2.dll mencoba untuk men-download file ini? Jika saya mendapatkan rumah, saya akan mencoba untuk menetapkan descriptors saya untuk mencocokkan satu saya ditemukan di bin dan akan mencoba MPLAB on it.
Saya rasa kami semakin dekat! 
Ditambahkan setelah 46 menit:
Dan terdapat dalam hal sihir pertama dari btyes boot bin: MCHP (microchip?) I've searched for it, if it's nanti (setelah beban) menggantikan ini dengan entry point atau Goto st, tetapi tidak di ICD2.dll.
Ditambahkan setelah 3 jam 34 menit:
Look at this:
I did what i said before, hanya menetapkan nomor versi yang lebih baru dan berharap ia akan mencoba untuk mengirim MPLAB OS! (Tentu saja saya fw bukan boot loader)
| Kode: | 2 Siap MPLAB ICD Menghubungkan ke MPLAB ICD 2 ICD0289: Tidak dapat kembali program ICD2 USB OS firmware. ICD0021: Tidak dapat terhubung dengan MPLAB ICD 2 2 Siap MPLAB ICD
|
Somehow boot loader harus bekerja, saya akan mencoba untuk melakukan sesuatu pada malam hari. |
|
| Kembali ke atas | |
 |
narccizzo
Bergabung: 20 Jan 2006 Posts: 173 Helped: 4 Lokasi: PATZCUARO, Michoacan, MEKSIKO
| 03 Apr 2006 18:43 Proyek untuk menggantikan CY7C64613 di ICD2 | | |
|
| Hi JaySlovak No, Im not sure, saya hanya membuka bin dan simpan dalam format hex. |
|
| Kembali ke atas | |
 |
Jay.slovak
Bergabung: 23 Mar 2006 Posts: 11
| 03 Apr 2006 20:45 Re: Proyek untuk menggantikan CY7C64613 di ICD2 | | |
|
| | narccizzo wrote: | Hi JaySlovak No, Im not sure, saya hanya membuka bin dan simpan dalam format hex.  |
Yep, it is weird sebagai string dapat dibaca, hanya kode tidak berbuat sesuatu |
|
| Kembali ke atas | |
 |
Zedman
Bergabung: 13 Oktober 2003 Posts: 294 Helped: 2
| 03 Apr 2006 22:25 Re: Proyek untuk menggantikan CY7C64613 di ICD2 | | | tag: icd2.dll |
|
| Good news setelah 2 jam debugging,
ICD2.dll tidak menggunakan BOTH dari bin file. OS file yang ingin di download hanya untuk ICD2s produk baru dengan nomor seri. NAMUN bila Anda memodifikasi versi id dalam nama file yang OS.bin ke * _FFFF.bin daripada mulai memeriksa versi tampilan bootloader:
| Kode: | Menghubungkan ke MPLAB ICD 2 ICDWarn0062: The USB boot dari firmware ICD2 aktif dan menyediakan komunikasi dengan ICD2. Ini adalah firmware out-of-date dan harus diperbarui. Ia tidak dapat diperbarui saat aktif. Namun, Anda dapat terus beroperasi dengan firmware yang sekarang boot jika Anda memilih untuk melakukannya. Apakah Anda ingin melanjutkan?
|
Jika saya tekan YA disini daripada mencoba untuk menyambung ke ICD2 sendiri, dan freezes (Aku hanya 4550 belum terpasang). Jika saya tekan NO selain rasanya ia mencoba untuk memperbaruinya tetapi kami disini NEED bootloader seperti ini, sehingga pesan ini muncul:
| Kode: | ICD0288: Tidak dapat kembali program ICD2 USB Boot firmware. ICD0021: Tidak dapat terhubung dengan MPLAB ICD 2 2 Siap MPLAB ICD
|
Okay guys, think think think CARA yang dapat kami gunakan bin untuk mendapatkan pekerjaan bootloader ke 4550!
Ditambahkan setelah 2 hari:
Saya juga dikompilasi sampel bootloader dengan benar VID / PID tetapi mendapat hasil yang sama seperti dengan 4550.
Ditambahkan setelah 16 menit:
Dapat, bahwa kami tidak dapat mendapatkan awal awal awal:) bagian dari bootloader yang diambil pertama bootloader yang mengambil os ...
Ditambahkan setelah 5 menit:
Ini adalah waktu ketika rkodaira harus dump his 4550 untuk tingkat 0 bootloader. (dengan harapan besar yang tidak dilindungi ...)
Rkodaira WE NEED YOU |
|
| Kembali ke atas | |
 |
albert22
Bergabung: 20 Jul 2004 Posts: 95 Helped: 3
| 03 Apr 2006 22:46 Re: Proyek untuk menggantikan CY7C64613 di ICD2 | | |
|
| Saya telah menganalisis printout yang saya miliki dengan saya yang BL010101. dan menemukan beberapa hal. Sepertinya untuk menerima perintah 5 datang baik dari PSP atau USART. 0x55 Jalankan kode diawali dengan 0x0010. 0x56 Load heksa (yang satu ini tampaknya memiliki lebih subcommands) 0x5a mengirimkan data 0x01 0x01 0x03 (Versi dari BL?) Dua perintah lainnya hanya menghidupkan Kesalahan dan Sibuk Leds dan hang di inffinite loop.
Berikut ini adalah rutinitas yang berkaitan dengan apa yang disebut "muatan hex" perintah:
Lain yang rutin mengirimkan BL berikut string 0x5b, "0810C9", 0x5d Lainnya mengirimkan jawaban diembed ke dalam string berikut 0x5b, "0A000", U, 0x31, U, 0x5d. (di mana U kelihatannya 0x31, 0x34, 0x36 dan 0x37).
I didnt memiliki banyak waktu untuk melanjutkan dengan analisis. Saya tidak melihat USB pemantauan yang telah diposting karena Im di cyber. Tapi saya rasa data ini harus dikemas ke dalam USB komunikasi |
|
| Kembali ke atas | |
 |
Zedman
Bergabung: 13 Oktober 2003 Posts: 294 Helped: 2
| 03 Apr 2006 23:30 Proyek untuk menggantikan CY7C64613 di ICD2 | | |
|
| albert,
Saya memeriksa serial comm versus USB, USB menggunakan pembungkus palung yang serial hal. Sepertinya ia menggunakan kontrol EP1 untuk port (it's OUT dan DI) dan EP2 sebagai data port, hanya ID (icd-> pc). |
|
| Kembali ke atas | |
 |
albert22
Bergabung: 20 Jul 2004 Posts: 95 Helped: 3
| 05 Apr 2006 6:39 Re: Proyek untuk menggantikan CY7C64613 di ICD2 | | |
|
| Inilah kemajuan dengan BL Tidak ada seperti subcommands. Beban perintah hex hex hanya mengambil catatan dan menulis data ke program memori 2 byte pada suatu waktu. It memeriksa berbagai kesalahan termasuk berbagai alamat. Ap. langkah untuk menghindari BL ke dalam program ini. Mengkonfirmasikan bahwa ini adalah BL allways penduduk di 877. Jendela [0A000 ", U, 0x31, U]. (Yang 2. U adalah U 1) adalah tidak mungkin karena melihat laporan kesalahan. Kesalahan meliputi: format buruk, checksum, alamat buruk berbagai kesalahan tulis dan EEPROM . Rutin untuk menunggu 16 karakter dimulai dengan 0x3c ('<') dan berakhir dengan 0x3e ('>'). ini berisi 16 karakter header alamat, dan panjang checksum untuk data yang akan ditulis dalam ASCII. Jika kepala benar Ap. BL dengan jawaban yang "[0810C9]" Data cames setelah 0x7b Format ini tampaknya berbeda dari intel hex format.
Zedman. Anda mungkin diakui seperti ini di RS232 Wil besok saya akan di rumah saya dan mampu memasang HDD log untuk memeriksa dan melihat apakah saya dapat membantu apapun. |
|
| Kembali ke atas | |
 |
Zedman
Bergabung: 13 Oktober 2003 Posts: 294 Helped: 2
| 05 Apr 2006 12:17 Re: Proyek untuk menggantikan CY7C64613 di ICD2 | | | tag: mplab protokol icd2 icd2.dll icd2w2k.sys mplbcomm.dll |
|
| Aku terjebak dengan hal ini USB. Dan saya sedih.
Saya tidak tahu apa yang harus dilakukan berikutnya. Saya menghabiskan banyak waktu di debug icd2.dll.
Masalahnya adalah: Saya tidak bisa mengirim bahkan satu byte kembali ke MPLAB.
Saya akan menjelaskan apa yang saya temukan sampai sekarang, meskipun tidak ada seorangpun yang benar-benar tertarik (hanya ingin ambil hal selesai). (Kecuali: albert, Kripton, rkodaira, Silvio dan guys di thread ini)
Jadi, MPLAB berkomunikasi dengan cara ICD2 ini:
[MPLAB -> ICD2.dll -> MPLBCOMM.dll -> icd2w2k.sys ->] --- [ICD2 perangkat]
Jika Anda memilih jenis koneksi USB akan meminta keterangan dari perangkat ICD2 dan memeriksa produk versi kata, jika dibandingkan 0x0003's it's a Cypress berbasis ICD2, if it's 0x0010 daripada yang berbasis 4550. Jika ditemukan 0x0010 daripada mengatakan apa yang telah diposting sebelumnya bahwa OS di ICD2 harus ditingkatkan. Ada yang menarik jika versi (0100) dalam nama file yang dimodifikasi OS.bin ke FFFF daripada skips langkah ini dan memeriksa versi bootloader. Di sini saya harus patch ICD2.dll mendapatkannya mencoba untuk memeriksa BL.bin file versi juga, it's hardcoded bahkan dari yang ditetapkan untuk FFFF it wont mencoba untuk meng-upgrade, yang mengapa saya patch itu (ditetapkan hardcoded FFFF ke bawah), jadi sekarang mengatakan apa yang saya terlalu mentoined sebelum: bl versi yang terlalu lama, tetapi tidak dapat ditingkatkan saat ini aktif.
Okay. Saya membuat makanan kecil dari sampel bootloader dengan benar descriptors dan mencoba untuk berkomunikasi dengan MPLAB dalam rangka mendekripnya protokol dan berusaha untuk yang baru di BL 4550 ICD2. ICD2 yang menggunakan Kripton, (versi Cypress) menetapkan 7 OUT / DI Endpoints, tetapi menurut log menggunakan hanya untuk EP1 IN / OUT dan EP2 untuk ID. (OUT berarti PC-> Device) Sepertinya ia mengirim usb spesifik perintah dan data melalui EP1, dan kembali pada EP1, dan mengirim readed byte dari ICD2 terpisah dari 877 melalui endpoint EP2 in
Ketika mencoba untuk mengirim MPLAB th OS.bin untuk meningkatkan fw os ia mengenakan getUSBdescriptor panggilan ke kernel driver, dan mengirimkan satu byte 0x12 lama menggunakan perintah DeviceIOControl perintah. Aku debugged, berhasil diterima pada 4550. MPLAB dari masalah yang GetStatus panggilan, dan tampaknya dari panggilan parameter yang mengharapkan 0x08 byte data kembali. Saya set saya buffer dengan 8 byte, dan mengatur kepemilikan ke Sie. Tetapi yang tidak pernah mengirimkan 8 byte kembali (tidak muncul dalam USBMon). Hanya menunggu. Ada banyak hal. Mungkin saya lakukan st beres dengan setup dari 4550, tetapi saya mencoba dengan yang lain progs dan bekerja, dapat mengirim byte kembali. Saya tahu tuan rumah harus mengirimkan ID dan perintah agar perangkat mengirimkan apa yang diinginkan. Tetapi ketika saya debugged MBLBCOMM, saya melihat bahwa perintah DeviceIOControl gagal! I tought maybe beberapa intelijen yang dibangun ke dalam. Sys file dan tetes paket karena itu salah isi, tapi saya rasa ini harus menjadi lebih tinggi tingkat tugas. Ketika saya mendapatkan rumah saya akan memeriksa Getlasterror nilai.
Setiap orang mempunyai ide bagaimana saya bisa melihat apakah ada di paket dikirim, atau bagaimana saya bisa melakukan? |
|
| Kembali ke atas | |
 |
Kripton2035
Bergabung: 19 Jul 2001 Posts: 482 Helped: 15 Lokasi: Bumi
| 05 Apr 2006 16:59 Proyek untuk menggantikan CY7C64613 di ICD2 | | |
|
| Anda mungkin harus menghubungkan ke PSP 877 pelabuhan dari 4.550 untuk melihat apa yang datang melalui, dan program yang 877 dengan bootloader kita ada? byte yang dapat Anda tunggu datang dari EP2 sehingga 877?
Anda ingin saya lakukan untuk mengirim file log lain dari kondisi yang tepat? by the way ini pasti anda memerlukan rokaida log dengan 4550 icd2 ..
PS: Saya tidak tertarik dalam proyek .. Saya hanya ingin tahu! Saya sudah memiliki usb icd2! |
|
| Kembali ke atas | |
 |
Zedman
Bergabung: 13 Oktober 2003 Posts: 294 Helped: 2
| 05 Apr 2006 20:08 Proyek untuk menggantikan CY7C64613 di ICD2 | | |
|
| Thanks Kripton,
Saya akan memberitahu Anda ketika saya membutuhkan dump , Ada sedikit lebih rumit daripada hanya melewati byte yang ke 877 dan belakang, ia memiliki protokol wrapper on it. Apa anda berkata sangat bermanfaat, tetapi rkodeira wont sacrify nya baru ICD2 ... Jika dia, dibandingkan dengan dump it's OS memperbarui proses akan menetapkan protokol baik ... |
|
| Kembali ke atas | |
 |
Kripton2035
Bergabung: 19 Jul 2001 Posts: 482 Helped: 15 Lokasi: Bumi
| 05 Apr 2006 22:09 Proyek untuk menggantikan CY7C64613 di ICD2 | | |
|
| | well I dont think he perlu sacrify nya icd2! hanya dengan beberapa kesedihan seperti usbmon I did .. mudah-mudahan saya masih bekerja icd2! |
|
| Kembali ke atas | |
 |
albert22
Bergabung: 20 Jul 2004 Posts: 95 Helped: 3
| 05 Apr 2006 22:16 Re: Proyek untuk menggantikan CY7C64613 di ICD2 | | | tag: icd2 memuat perintah hex |
|
| Saya tidak dapat menginstal HHD memantau untuk melihat log karena saya hanya ada di rumah w98. Anda dapat mengekspor dump dari OS untuk men-download file. Txt, untuk saya? ------- Bagaimana Cy ulang dengan 877? Ada sinyal (43 pin) ke bagian yang Collector Q1 adalah MCLR. Tapi ini masuk ke konektor bernama Prog. Sekarang aku menyadari bahwa sinyal ini harus pergi ke 877 juga. Kita harus mengetahui yang USB perintah ulang pada 877. Mungkin ia adalah salah satu kontrol endpoints? I dont know what is the fungsi ini Konektor Prog. tetapi ekstra endpoints mungkin berhubungan dengan itu. ---------- Salah satu OS diload ke ICD2 nampaknya: ICD01020405.hex saya mencoba disassemby itu tapi tidak bisa mendapatkan disassembler hex untuk mengganti alamat dengan nama register. Akan mengambil lebih banyak waktu untuk mencari tahu cara kerjanya. Yang menarik adalah fakta bahwa kode dimulai pada 0x0010. Ingat bahwa BL panggilan alamat ini dengan menjalankan perintah.
BL versi yang dilaporkan oleh mplab adalah 01.01.01.00 ini berjalan cukup baik dengan perintah yang BL jawaban 01,01,01,03 --------- Tidak ada DPot (MCP41xxxx) di Brasil ICD. Bagaimana mereka mengatur Vpp? Sebagian besar clones tetap memiliki Vpp. Apakah ini berarti Brasil ICD hanya biaya rendah dan tidak klon yang baru ICD2? I dont think microchip yang pergi untuk tetap vpp. Jika ada metode lain yang mengendalikan vpp, selain DPot firmware akan memerlukan perubahan dari ICD OS. OS yang lama tidak akan bekerja di baru. Yang mungkin penyebabnya adalah bahwa DLL memeriksa versi. |
|
| Kembali ke atas | |
 |
Zedman
Bergabung: 13 Oktober 2003 Posts: 294 Helped: 2
| 05 Apr 2006 22:32 Proyek untuk menggantikan CY7C64613 di ICD2 | | | tag: mplab protokol icd2 icd2w2k.sys icd2w2k download 4550 bootloader menulis icd2w2k.sys download download icd2w2k |
|
| I don't think kita harus berurusan dengan hal-hal mengenai sirkuit atau protokol atau hubungan antara 877 dan 4550 belum. Saya pikir kita semua harus ditulis di 4550 bins disertakan dengan MPLAB. Kita harus menulis bootloader kompatibel dengan icd2w2k.sys untuk mendapatkan OS.bin download, dan setelah itu kita dapat scracth kami 877 kepala bagaimana terhubung.
Ditambahkan setelah 5 menit:
Dalam ICD2br lain menggunakan jenis chip yang menghasilkan Vpp. Rkodaira mentoined, periksa posting sebelumnya. |
|
| Kembali ke atas | |
 |
Silvio
Bergabung: 31 Desember 2001 Posts: 800 Helped: 90
| 06 Apr 2006 2:36 Re: Proyek untuk menggantikan CY7C64613 di 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 | |
 |