3
\$\begingroup\$

I have a serial flash chip connected to an ARM microcontroller (AT91SAM9G20). I'd like to be able to program the serial flash after both chips are soldered on to the PCB. For each of the serial flash lines, I can add vias that I can hit with pogo pins pretty easily.

Do I also need to disconnect the serial flash pins from the microcontroller with jumpers? What is the impedance of microcontroller pins when the micro is not powered?

(I have measured the impedance of the pins to ground on the microcontroller in parallel with the flash at around 2 MΩ with a multimeter, but I don't trust that sort of measurement when operating in the presence of diodes.)

\$\endgroup\$
2
  • \$\begingroup\$ Listen to the voice of experience: At some point in the project's evolution, you will want to program the serial flash from the microcontroller. No matter how much you think field changes are unlikely, you should go ahead and write your firmware to update the serial flash. Then your test fixture need only talk to the main microcontroller. \$\endgroup\$
    – markrages
    Commented Jan 30, 2012 at 17:49
  • \$\begingroup\$ I can actually already program the serial flash from the microcontroller, but it's relatively slow because of the JTAG software involved. But I am seriously considering dropping this altogether and sticking with the slower JTAG method because it's known to work. \$\endgroup\$
    – pingswept
    Commented Jan 30, 2012 at 18:28

2 Answers 2

6
\$\begingroup\$

The impedance of microcontroller pins is likely quite high. However, the issue is that these pins likely (I'm not familiar with that micro and haven't looked it up) have protection diodes or similar circuitry to Vss and Vdd. The net result is that they look like high impedance within one voltage drop of ground (and power since power = ground when unpowered). If you try to drive it higher than that, it may take significant current and it may also damage the micro. In some cases it can even sortof power up the micro, but not how that is intended.

There are generally two ways to deal with this

  1. Power up both units during the manufacturing test and programming process. Then you have normal data lines that behave as they are supposed to. Make sure the micro sets these to high impedance. You may have to load different code in it temporarily for that purpose. It's not unusual to have special production test code, or modes for production test in the operational code.

  2. Put enough resistance in series so that the micro won't get hurt (good luck finding clear specs on that though), and won't load the signal to the point the programming jig can't handle.

\$\endgroup\$
8
  • 1
    \$\begingroup\$ Further to point #1. Most microcontrollers will keep their IO lines in high-impedance state while in reset. So you may only need to ensure the micro is held in reset while programming the other part. \$\endgroup\$
    – markrages
    Commented Jan 30, 2012 at 17:37
  • \$\begingroup\$ I can't easily do method 1 because the serial flash holds the program the micro will run, so method 2 is more appealing. If I put 10k resistors in series with all the serial flash data pins, that would limit the current to ~0.27 mA when I pulled them high, and I'm confident that wouldn't burn anything. I'd expect communication between the chips would still work because 10k is small compared to the ~MΩ impedance of all the inputs. Does that sound sensible? \$\endgroup\$
    – pingswept
    Commented Jan 30, 2012 at 17:43
  • \$\begingroup\$ @markrages: On one line where I have an LED hooked up, this micro appears to leak ~50 uA both in reset and bootloading. Stops once Linux boots and the sysfs driver takes over. Kind of weird. \$\endgroup\$
    – pingswept
    Commented Jan 30, 2012 at 17:47
  • \$\begingroup\$ @pingswept, the static impedance of the pins isn't what is important, it is the capacitance of the inputs. The capacitance will combine with the 10k resistors to form a low-pass RC filter. This is bad for a high-speed data line. Like a serial flash is likely to have. \$\endgroup\$
    – markrages
    Commented Jan 30, 2012 at 17:53
  • \$\begingroup\$ @markrages I could decrease the series resistors to 1k. Is there a way I can estimate the effects? The traces are all 5 mil wide with length around 0.5 inches, mostly about 30 mil from a ground plane. \$\endgroup\$
    – pingswept
    Commented Jan 30, 2012 at 18:08
2
\$\begingroup\$

Microcontrollers and other digital IC's almost always include some circuitry to protect pins from static by draining away at least some current when the pin voltages would start to reach dangerous levels. Note that if there weren't any protection circuitry, and if a pin wouldn't leak at all until it failed catastrophically, even a picoamp flowing into a pin would be enough to destroy a chip (even a picoamp flowing into a chip will cause the voltage to increase until either there is some leakage or the part fails; in practice, many chips would start to leak more than a picoamp before the voltage was high enough to cause catastrophic failure). There are two general ways this can be accomplished:

  1. Design a pin so that when its voltage is significantly higher than VDD (more than ~0.3 volts), current will flow from that pin to VDD; if the pin gets more than ~0.7 volts over VDD, the current will increase markedly.
  2. Design a pin so that if its voltage gets too much above VSS (e.g. more than ~5.5 volts), current will flow to VSS.
The former style of protection is cheaper and more effective in cases where there is no need to run a pin above VDD. It will, however, mean that any pin which has voltage on it when VDD is not will attempt to power the device.

To see which style of protection a pin has, check the "Absolute Maximum Ratings" section of the data sheet. If a pin's maximum voltage is listed as something like VDD+0.3 volts, the pin cannot be used while the chip is unpowered. If it is listed as something like "VSS+5.5 volts" or simply "5.5 volts", then it may be possible to use the pin while the device is powered off.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.