We starting mass production of a custom device. It uses Chinese MCU LT1901. MCU core is arm926ej-s. MCU boots from NAND flash. We are forced to program NAND flash before soldering on PCB. I don't like it. I want to have a way to program NAND after soldering over JTAG. I have only Chinese documentation for this MCU and this document doesn't have information about JTAG. I have JTAGs like Link, FT2232H module. I know in theory it's possible to do over JTAG. But is it possible if I have not information about JTAG? I tried to connect J-Link commander for different devices with the same core, but it fails. What is the easiest way to program NAND over JTAG in my case?

  • Hi and welcome to RE.SE. The way JTAG works I don't think you can do that without basically finding out about every single device in the chain that you want to access. I'd be intrigued, though, to see if anyone has a way to do this without BSDL file. Name of the vendor and so on would possibly help us to look for information on our own, also. – 0xC0000022L Apr 20 at 20:51
  • The manufacturer is Chinese company linktop. This chip also has inside DSP core called ZSP. I have not BSDL file, but I have datasheet with registers information and I have source codes of project for this chip. I can't open datasheet and source codes for 3rd party. I am under NDA. Also I have two JTAG hardware for this chip. It is a different JTAG for ARM and DSP cores. They works only under XP, and I work with them only in China on Chinese PCs. I never used them on my PC, need windows XP. And JTAG for ARM is for LPT port. – uriy Apr 21 at 5:46

There are two possible ways of programming flash over JTAG in such a circuit:

  1. use JTAG boundary scan to directly bitbang flash chip pins connected to the CPU as if you connected programmer to it. This usually requires detailed mapping of chip pins to boundary scan register (e.g. BDSL file), knowledge of how the flash chip is connected to the CPU, and programming algorithms. AFAIK urJTAG project offers some facilities for this but you will likely need to customize if for your specific project.

  2. use JTAG debugging functionality (e.g. ARM's CoreSight) to upload a small program into the CPU RAM that would effectively turn the CPU into a flash programmer and allow you to program the chip connected to it. Advantage of this method is that it's less dependent on specific pinout and connectivity between CPU and flash, much faster than boundary scan bitbanging. OpenOCD implements flashing algorithms for many CPUs and flash chips. You can also look into commercial products like Segger J-Link.

| improve this answer | |
  • This sounds quite theoretical and carries some big ifs. Number 1 seems right out, because the necessary information simply isn't there. So it would only become viable with detailed information, no? If not, what am I missing? Basically I am wondering how your point 1 differs from the comment I made on the question. But the second one sounds very intriguing and since the MCU must be bootable right now, it even seems viable. – 0xC0000022L Apr 22 at 8:13
  • 1
    @0xC0000022L yes, ideally you need BSDL. but in theory you can figure it out by setting the pins via boundary scan and measuring outputs with a multimeter. It can probably be even automated somewhat. Anyway, I thought it's worth mentioning even if not applicable in this specific case. – Igor Skochinsky Apr 22 at 8:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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