This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Need help Minimon + C167 + 29F400 (Read Ok/Write impossible)

Need help for Minimon + C167 + 29F400 (Read Ok/Write impossible)

Hello all!

I try to write in 29F400 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.

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) ...But I think only 3 CS signals are used, CS0,CS1, and CS3 connected on 74HCT574D Clock Input (Pin 11)

--------------
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

Parents
  • You are connecting signals:

    OE to C167 Pin CS0 (P6.0)
    WE to C167 Pin CS1 (P6.1)
    CE to Ground

    Shouldn't CE go to CS(0), OE go to RD, WE go to WR? Find an example schematic from Keil to see what I mean... Keil should have example startup code to go with it, so you can see how the BUSCON and other registers are set up to match the circuit design.

    Also, Flash won't erase or write unless you program the Flash Command Register properly. How are you using the Command Register?

    It is too bad you are using the C167CS-LM with no internal ROM but you need Flash so you're trying to use external Flash, from what I just read of MiniMon it has support for on-chip Flash programming, but not external Flash. Isn't your application better suited for a 'C166 variant with on-chip Flash? There's better tool support for on-chip Flash in my experience, especially for the newbie.

Reply
  • You are connecting signals:

    OE to C167 Pin CS0 (P6.0)
    WE to C167 Pin CS1 (P6.1)
    CE to Ground

    Shouldn't CE go to CS(0), OE go to RD, WE go to WR? Find an example schematic from Keil to see what I mean... Keil should have example startup code to go with it, so you can see how the BUSCON and other registers are set up to match the circuit design.

    Also, Flash won't erase or write unless you program the Flash Command Register properly. How are you using the Command Register?

    It is too bad you are using the C167CS-LM with no internal ROM but you need Flash so you're trying to use external Flash, from what I just read of MiniMon it has support for on-chip Flash programming, but not external Flash. Isn't your application better suited for a 'C166 variant with on-chip Flash? There's better tool support for on-chip Flash in my experience, especially for the newbie.

Children