Title: Need help for Minimon + C167 + 29F400 (Read Ok/Write impossible) Post by: kitnoos2002 on January 22, 2012, 03:33:06 PM Hello all!
I try to write in my ECU but I need help with Minimon. I did a lot of tests for hours and hours. I read lots of informations on the net. Infineon C167CS User Manual is very useful but I need help. http://fbim.fh-regensburg.de/~ems_labor/EMS/docu/Infineon/c167cs_um.pdf My ECU is a Siemens / VDO 5WY / SIMK43 I can read 29F400 with success OK! But impossible to Write or Erase... I had set driver A29F400b.hex I think the problem come from the registers settings Buscon and Addrsel because maybe I don't understand all very well. What should be the settings in the [Register] and [Memory] section in file Default.ini ? What should be 29f400 start address with my config? Here is my config: C167CS-LM (No internal Rom) 8mhz x 3 = 24mhz Connected in Boot-Mode with asc0 port (Usart, NOT K-line) 4MB Flash (AM29F400BB-55) Word Mode (16 Bit ; Pin "BYTE" to +5V) 16 Bit demultiplexed Bus OE to C167 Pin CS0 (P6.0) WE to C167 Pin CS1 (P6.1) CE to Ground *Reset: BUSCON0=0680 *Reset: SYSCON=0400 *Reset Configuration: External Bus enabled *Reset Configuration: 16 Bit demultiplexed Bus *Reset Configuration: WR# and BHE# retain their normal function (P0H.0=0) *Reset Configuration: On chip watchdog timer is disabled (RD#=0) *Reset Configuration: Lengthened ALE signal RP0H=00C7 (5 "chip select" activated) -------------- Address Pinout 29F400 / C167 A0 / A1 A1 / A2 A2 / A3 A3 / A4 A4 / A5 A5 / A6 A6 / A7 A7 / A8 A8 / A9 A9 / A10 A10 / A11 A11 / A12 A12 / A13 A13 / A14 A14 / A15 A15 / A16 A16 / A17 A17 / A18 -------------- -------------- Data Pinout 29F400 / C167 DQ0 / AD15 DQ1 / AD13 DQ2 / AD11 DQ3 / AD9 DQ4 / AD0 DQ5 / AD2 DQ6 / AD4 DQ7 / AD6 DQ8 / AD14 DQ9 / AD12 DQ10 / AD10 DQ11 / AD8 DQ12 / AD1 DQ13 / AD3 DQ14 / AD5 DQ15 / AD7 -------------- Thank you for your big help! Chris Title: Re: Need help for Minimon + C167 + 29F400 (Read Ok/Write impossible) Post by: Tony@NefMoto on January 23, 2012, 12:36:04 PM Can you post your Minimon INI file? We should check that you have the correct configuration for the flash memory regions.
Title: Re: Need help for Minimon + C167 + 29F400 (Read Ok/Write impossible) Post by: kitnoos2002 on January 23, 2012, 01:22:58 PM Thank you for your help!
Here is my Minimon Default.ini file. I left section register empty because I do too many tests and I do not know what to set in buscon, addrsel... I I remember I tried 800A for addrsel1. I want to add for info : RP0H=00C7 (5 "chip select" activated) ...But I think only 3 CS signals are used. CS0 on OE CS1 on WE and CS3 connected on 74HCT574D Clock Input (Pin 11) Title: Re: Need help for Minimon + C167 + 29F400 (Read Ok/Write impossible) Post by: Tony@NefMoto on January 23, 2012, 02:06:18 PM I think you need to specify some more settings and change the start address for your external flash memory region. Your flash definition section doesn't specify which driver features are supported, and your memory addresses start at zero, when they should start at a multiple of 0x100000.
Here are my settings for the 29F800: Code: NAME=ExternalFlash Title: Re: Need help for Minimon + C167 + 29F400 (Read Ok/Write impossible) Post by: kitnoos2002 on January 23, 2012, 03:45:52 PM Thank you!
But I have the same problem : *Erase: loading driver *Erase: loading driver C:\PROGRAM FILES\MINIMON\DRIVER\A29F400B\A29F400B.HEX *ERROR: download not successful I corrected driver features section. I tried all multiples of 0x100000 until 0x900000 But same problem. I can see in the P6 register, the chip select is CS0 but it should be CS1 for write command. CS0 is connected for read command Title: Re: Need help for Minimon + C167 + 29F400 (Read Ok/Write impossible) Post by: kitnoos2002 on January 23, 2012, 07:17:44 PM When I set syscon, buscon0 , buscon1, addrsel1, I have a different error message.
Minimon send succesful the driver, but he can't erase : *Erase: loading driver *Erase: loading driver C:\PROGRAM FILES\MINIMON\DRIVER\A29F400B\A29F400B.HEX *Download: 456 bytes *ERROR: Erase not successful Title: Re: Need help for Minimon + C167 + 29F400 (Read Ok/Write impossible) Post by: kitnoos2002 on January 24, 2012, 09:28:10 AM Hello Tony@NefMoto!
What is your settings in your working Defaut.ini Register section? I can be very useful for me! Mainly theses : SYSCON=? BUSCON0=? BUSCON1=? ADDRSEL1=? Thank you very much! Title: Re: Need help for Minimon + C167 + 29F400 (Read Ok/Write impossible) Post by: Tony@NefMoto on January 24, 2012, 11:57:21 AM Here is the register definition I have:
Code: [Register] Title: Re: Need help for Minimon + C167 + 29F400 (Read Ok/Write impossible) Post by: rkam on January 26, 2012, 11:44:10 PM Are the crossed data and address lines handled by the register settings?
Title: Re: Need help for Minimon + C167 + 29F400 (Read Ok/Write impossible) Post by: kitnoos2002 on January 27, 2012, 08:21:29 AM Thank you Tony!
Your settings don't work for me. I have disassembled the firmware and I tried with originals setting from the ecu, but he doesn't work. Maybe the driver A29F400B.hex don't work with my spécial case. CS0 is connected to pin OE and CS1 is connected to pin WE, so read and write aren't at the same address. @Rkam : File readed is ok. I think we do not care for the data line if read trought C167. But data are scrambled if I read directly the flash. But it isn't a problem for me. Title: Re: Need help for Minimon + C167 + 29F400 (Read Ok/Write impossible) Post by: rkam on January 27, 2012, 11:26:02 AM How about erase and write commands sent to the flash chip?
Title: Re: Need help for Minimon + C167 + 29F400 (Read Ok/Write impossible) Post by: Tony@NefMoto on January 27, 2012, 11:56:32 AM Thank you Tony! Your settings don't work for me. I have disassembled the firmware and I tried with originals setting from the ecu, but he doesn't work. Maybe the driver A29F400B.hex don't work with my spécial case. CS0 is connected to pin OE and CS1 is connected to pin WE, so read and write aren't at the same address. @Rkam : File readed is ok. I think we do not care for the data line if read trought C167. But data are scrambled if I read directly the flash. But it isn't a problem for me. Do you get different results if you try to erase a sector or erase the entire flash chip? Make sure you are only trying to erase whole sectors, and not parts of sectors. Title: Re: Need help for Minimon + C167 + 29F400 (Read Ok/Write impossible) Post by: kitnoos2002 on January 27, 2012, 12:46:18 PM 8Bit 16Bit SA0 00000h–03FFFh 00000h–01FFFh SA1 04000h–05FFFh 02000h–02FFFh SA2 06000h–07FFFh 03000h–03FFFh SA3 08000h–0FFFFh 04000h–07FFFh SA4 10000h–1FFFFh 08000h–0FFFFh SA5 20000h–2FFFFh 10000h–17FFFh SA6 30000h–3FFFFh 18000h–1FFFFh SA7 40000h–4FFFFh 20000h–27FFFh SA8 50000h–5FFFFh 28000h–2FFFFh SA9 60000h–6FFFFh 30000h–37FFFh SA10 70000h–7FFFFh 38000h–3FFFFh In source code, we can see Minimon driver is build with 8Bit sectors. Maybe I must rebuild a new driver with 16Bit sectors. I tried with 8Bit and 16Bit in .ini file, but no in Driver. And maybe Rkam is right! I thought Write Command was just sending data to address, but Before sending data, there is 3 cycles. First cycle must send data AA to address 555 Second cycle must send 55 to address 2AA and last cycle must send A0 to address 555 And after we can send our data. PS : In driver there is just the 3rd cycle, and it send A0 to 5555? Maybe an error? Title: Re: Need help for Minimon + C167 + 29F400 (Read Ok/Write impossible) Post by: gremlin on January 27, 2012, 05:15:22 PM Maybe the driver A29F400B.hex don't work with my spécial case. Yes. For Simos ECUs you must write new driver. Standard driver taken from minimon driver directory can read flash and can't perform correct erase/write operations on Simos hardware. Title: Re: Need help for Minimon + C167 + 29F400 (Read Ok/Write impossible) Post by: kitnoos2002 on January 27, 2012, 06:05:32 PM Ok Gremlin!
Thank you for informations! But I'm not good enough to write a new driver in assembler. Otherwise, if you know where I can found a approaching driver, I can maybe modify it for working with my ECU. (It is not a Simos but Simk43 / 5wy) |