Announcement

Collapse
No announcement yet.

EEPROM function confusion

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #41
    Re: EEPROM function confusion

    if it's holding firmware then they program it on the board with spring loaded pins that press against pads near the chip.

    if it just holds settings then sometimes the system will detect a blank chip when you turn it on and load it with default values.

    Comment


      #42
      Re: EEPROM function confusion

      Originally posted by ramondo View Post
      HIJACK ALERT?? I have a question about how an EEPROM is programmed at the factory; is it done with firmware installation or does it LEARN at first power up? Can we duplicate this process at home?
      That depends on the approach the designer of the circuit/board decided to take and how much functionality he wanted to put into that "interface". (i.e., every connector should maximize its utility to justify its cost!)

      Firmware (i.e., "software"/program code) tends to be treated differently than "nonvolatile parameters"/settings; typically, there is more data involved in the program code than the settings that it eventually references. Additionally, the firmware case has to be able to deal with the possibility of a "blank" MCU -- one that has no preexisting software inside it -- whereas the settings can always benefit from an MCU that has had its "brains installed".

      Modern MCU's (with onboard Flash) tend to include a "loader" that the manufacturer has installed as part of the "blank" chip that he sells to everyone. So, you can use this mechanism to introduce the software to the MCU. Or, you can introduce your own software (using this or other methods) and then use your software to load additional "data" into the MCU's internal Flash -- as well as any other storage devices (for "progra" OR "settings") that the MCU has access to (often, the program won't fit inside the MCU and will rely on external Flash devices).

      The physical interface can take the form of a special connector that is usually put into the design to facilitate development and then simply not stuffed -- to save a penny -- when the boards are mass produced. Often, this is a 5V serial port (Rx/Tx only) but it may also be as basic as a JTAG port. In this latter case, it can provide automated test equipment (ATE) with the ability to exercise all of the pins on the MCU so the "tester" can pretend to be the MCU and twiddle various bits of I/O on the board (as the MCU would) and observe the results to determine if the board is functional.

      [Think of JTAG as a big shift register inside the device with the parallel inputs/outputs connected to the chip and the serial input/output brought out to the tester. So, the tester clocks data into this giant shift register from a "JTAGin" pin on the interface connector and can interact with 5, 20, 150, etc. pins in the circuit through just this "one" wire! You can connect the JTAG interface of one chip to the JTAG interface of another chip, etc. and effectively exercise all of the pins on all of those chips via this ONE interface to the tester, albeit slowly]

      http://en.wikipedia.org/wiki/JTAG

      In my case, I have the factory preload a "test program" into the MCU's. They can do this with dedicated programming hardware at the chip level. Or, via an interface on the circuit board (the option lets them decide what is most economical, today). They can also have the chip manufacturer preload that image into the components (MCUs) if they get a better price on that option (to avoid the labor of doing it on the factory floor).

      The test program lets the factory exercise the assembled hardware in ways that I have decided are important for my design. Someone else might have different criteria. If the assembled board doesn't pass the test procedure that we've established contractually, I won't accept it -- the factory has to fix it or eat it (it may be cheaper for them to just replace it with another unit than to try to repair it).

      Once the assembled boards have been incorporated into "finished products" (which may happen at a different factory), they still have their "test" code installed. There's no harm to this as they don't go out to consumers in this state. And, if they did, the consumer would just complain that it was broken -- there are no secrets to be gleaned from having access to a product in this state (so, I don't risk disclosing any secrets to the factory that is manufacturing these things, either! Think: counterfeiting)

      Prior to sale, the "test software/firmware" that still resides in the device is called on to load a new firmware image over the test software. In my case, that is done via the network interface (high speed and the connector is already accessible on the outside of the device; no need to disassemble it to gain access!).

      This allows me to put whatever "program image" (firmware AND settings) I want into each device. So, I can install the firmware for options 1, 2 and 6 in this unit and options 3, 4 and 8 in the next unit. Likewise, I can set individual options (e.g., initial password) on a unit-by-unit basis.

      Finally, when these particular devices are purchased by the end user, he "introduces" them to the rest of his "system" by a similar "programming interface" on his system that allows his system to install "shared secrets" in the device that neither I nor anyone else ever sees.

      Ages ago, in-system programming (ISP) required special provisions on the circuit board (to allow the EXTERNAL programmer to impose special programming voltages and signals on the pins without damaging the other devices in the circuit that may be connected to those pins -- like the CPU!). Additionally, it required special external hardware (to create those voltages and control signals).

      Nowadays, modern non-volatile storage devices have the ability to be programmed in situ. Every Flash chip has a built-in ~20V "power supply" that it uses to program/erase its cells; there's no need for a 20V "pin" on the device! Likewise, the chips have all the timing and control logic to perform the action so there is no need for an external "programmer" to do all of that.

      To interface to a JTAG port, you just need a few logic level signals (see the URL, above).

      To interface to an internal logic-level serial port, you need an off-the-shelf level translator (to get from the "logic levels" on that port to the ~+-12V signals that a typical "serial port" requires).

      To interface to the network interface (my example), you need a regular ethernet network.

      So, to do it at home, you don't need any special hardware (or, at least nothing that you can't hack together with a soldering iron and some hookup wire and a connector or two).

      The problem comes in the "protocols" that are involved in each of these.

      JTAG is standardized. And, with a datasheet for the device(s) in question, you can know what order the various "pins" appear in the serial data stream that you will be exchanging with the device (remember, if there are two or more JTAG capable components daisy-chained inside the device, you have to sort that out yourself). Then, you're at the mercy of the component(s) manufacturer(s) as to what you can or can't do to the device(s) -- some manufacturers won't publish particular details of their interfaces as "trade secrets" or "security by obscurity" features (e.g., to prevent The Public from being able to access secure features of their devices)

      Serial port interfaces are similar in complexity to JTAG. However, there is also the caveat that the product designer could choose to make "proprietary" (custom) use of the serial port to provide this, or some other, feature -- even though the port is "buried" inside the product.

      A common ethernet technique is to use a DHCP (dynamic host configurationl protocol) to assign an IP address compatible with the local subnet and TFTP (trivial file Transfer Protocol) to transfer an "image file" from a server. The product gets the name of the file that it "needs" from the (DHCP) server and then fetches the file over the ethernet interface. It can opt to store the contents in RAM until it has fetched it in its entirety (so it can verify the integrity of the entire image before acting on it!). Or, it can program the file's contents into its internal memory as it receives it (ask for the next chunk when you are done programming the previous chunk).

      [The designer has to sort out how he'll handle partial or interrupted downloads as you don't want to leave the product in a funky state]

      Parameters (settings) in the product can be forcefully initialized as part of the firmware installation process.

      A more robust approach is to have the firmware (after every POST), look at the BLOCK of settings and decide if it "looks right" -- or not. This test usually involves verifying one or more checksums/hashes of the settings data. If a particular checksum doesn't "verify", then some part of the data that it covers has been corrupted (or, the checksum has been corrupted!). In which case, the software has to determine a suitable set of defaults with which to replace the current/corrupted settings (and, alert the user to the fact that the world is no longer as he had hoped!)

      If it looks right, those settings are typically copied into RAM, somewhere. This allows them to be accessed faster (e.g., in the case of a serial EEPROM) and changed faster. It also reduces the wear issue on the nonvolatile device because the device isn't accessed for all of those reads/writes during normal use! (just before the product powers down, you quickly copy the current settings back into Flash, update the checksum(s) and power off)

      <frown> Long-winded but, hopefully, gives you a better idea of how you can move "information" into a device automatically.

      Comment


        #43
        Re: EEPROM function confusion

        Great info. I'm still confused on how freezing an eeprom allows it to work temporarily?

        I've always been told that in semiconductors heat allows electrons to move better by lowering the resistance, but in regular wire conductors the opposite is true and colder temps allow lower resistance for better conduction.

        Is this accurate? If so how does it apply to the phenomenon of freezing an eeprom in some cases allows it to work?

        Comment


          #44
          Re: EEPROM function confusion

          cold makes the buffers more sensitive to the electron-charge in the memory cells.

          Comment


            #45
            Originally posted by stj View Post
            cold makes the buffers more sensitive to the electron-charge in the memory cells.
            Could you explain how?

            Comment


              #46
              Re: EEPROM function confusion

              superconductivity, electrons move more freely at lower temperatures.
              or another way of putting it, lower temperatures reduce the resistance of the gates.

              Comment


                #47
                Re: EEPROM function confusion

                ^ Okay... that response made my head hurt...

                Comment


                  #48
                  Originally posted by stj View Post
                  superconductivity, electrons move more freely at lower temperatures.
                  or another way of putting it, lower temperatures reduce the resistance of the gates.
                  This contradicts what I've always been told that semiconductors are the opposite in that hotter temperatures reduce the resistance? In a wire what you say is true from what I've been told but opposite for semiconductors. Is the eeprom not a type of semiconductor?

                  Comment


                    #49
                    Re: EEPROM function confusion

                    I'd say that the cooling affecting operation of semiconductors is incidental and situational. "Something worth trying but no guarantees" depending on what circuit on the IC is actually failing.

                    Comment


                      #50
                      Re: EEPROM function confusion

                      works with eproms - i'v done it.

                      Comment


                        #51
                        Re: EEPROM function confusion

                        Originally posted by caphair View Post
                        This contradicts what I've always been told that semiconductors are the opposite in that hotter temperatures reduce the resistance?
                        It's probably the change from cold-to-hot, or hot-to-cold, rather than the absolute temperature, that makes faulty/going-faulty semiconductors exhibit weird behaviours.

                        As for a TV failing to boot, my guess is that the main microprocessor is reading an out-of-range value from the EEPROM.

                        Comment


                          #52
                          Re: EEPROM function confusion

                          just read this thread after i was thinking of how i can keep a tv set alive enough to start up again after freezing the eeprom to get it running in the first place . it makes me now think differently from my first thought of keeping the eeprom live . now it looks like i would need to keep the processor live .
                          now would a super capacitor do the job or would it need batteries i wonder ? mmmm
                          i know i can get a programmed eeprom but may need to do this in the desert one day .

                          Comment


                            #53
                            Re: EEPROM function confusion

                            If by freezing the eeprom, the tv works, then you remove the eeprom/spi from the tv and place it in the programmer, then you freeze the eeprom/spi when it's in the programmer and copy the data, then program a new eeprom/spi and install the new chip in the tv. Been there and done it about 5 times.

                            Comment


                              #54
                              Re: EEPROM function confusion

                              Originally posted by R_J View Post
                              If by freezing the eeprom, the tv works, then you remove the eeprom/spi from the tv and place it in the programmer, then you freeze the eeprom/spi when it's in the programmer and copy the data, then program a new eeprom/spi and install the new chip in the tv. Been there and done it about 5 times.
                              i dont have a programmer .

                              Comment


                                #55
                                Re: EEPROM function confusion

                                on the subject of freezing stuff,
                                has anobybody else noticed that modern "freezer" spay is just fucking Butane and lot a liquid nitrogen mix?
                                the bastards reduced the production cost to nothing and caused an explosive risk while still jacking up prices!!

                                i just buy lighter fuel at the £ store now - fuck them if it's Butane in both cans!!

                                Comment


                                  #56
                                  Re: EEPROM function confusion

                                  Originally posted by petehall347 View Post
                                  i dont have a programmer .
                                  part number?
                                  Last edited by stj; 09-07-2020, 02:57 AM.

                                  Comment


                                    #57
                                    Re: EEPROM function confusion

                                    Originally posted by stj View Post
                                    part number?
                                    am waiting on .bin files off umc . i need to send them the tv serial number first . am hoping to update it to see if it works then .

                                    Comment


                                      #58
                                      Re: EEPROM function confusion

                                      i wanted to see if my new programmer supports the part.

                                      Comment


                                        #59
                                        Re: EEPROM function confusion

                                        well i got the .bin files .followed the instructions and now it appears to have a wiped eeprom so nothing much happening now .oh well £8 it is then for programmed chip .

                                        Comment


                                          #60
                                          Re: EEPROM function confusion

                                          Originally posted by petehall347 View Post
                                          i dont have a programmer .
                                          If it just for 8 pin eeprom/sp used in tv's the CH341A usb progrmmer will usually works and it is cheap. I find it is these are the ic's that seem to fail in a way that freezing them helps get the tv working (temporarly)

                                          Comment

                                          Working...
                                          X