This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OMAP-L138: trouble to access 8-bit NAND flash, 1st byte skipped of any string read

Part Number: OMAP-L138

We've designed and build (mostly successfully - everything but the 8-bit NAND works) an OMAP-L138 embedded system, whose processor kernel (CPU, RAM, Flash and Power manager)  is an exact hardware copy of the LCDEVKIT-AE7 evaluation board. This board uses a MICRON 16-Bit 512MB NAND Flash  MT29F4G16ABADAH4    as mass storage device and works pretty well.

Compiling, building and running our linux system and application software, loaded from the Flash and copied to RAM by u-boot, works perfectly, when the image has been prepared and flashed using the TI  OMAP-L138_FlashAndBootUtils_2_40  package. We compiled and build that package from sources sucessfully, in order to add some debugging outputs into the sft part, running on the ARM.

Caused by current market shortage of those 3.3V / 16/Bit  Flash chips, we decided to switch to its 1.8V / 8-Bit sibling  MT29F4G08ABBDAH4-ITX  of the same manufacturer.

We changed power supply of the Flash and interfacing of all power-group B  GPIOs of the OMAP to 1.8V and the board works pretty well in all functions, executing its programm from RAM.  The only thing that doesn't work are any accesses to the new 8-bit Flash.

By debugging the sfh / stf parts of the AIS tool package mentioned above, we were able so isolate the problem a bit, as follows:

The first read access to the physical Flash chip (after successfully download the BOOTUBL parts and our flash image file to RAM by FTP)  is reading out two 4-byte-strings at chip offsets 0x00 an 0x20, yielding the ONFI signature and the manufacturer device ID string. These two strings contain nearly exact what we expect (from the MICRON data sheet), but in each string the first byte is missing, so that the second byte to be expected is in the first place (array index 0), the third byte is in array index 1 and the fourth byte in array index 2. Array index 3, the fourth byte, contains an additional value, not described in the data sheet. This is true for both strings read out in those two first accesses.

Shifting the bytes in those two arrays satisfies the program expections, so that the subsequent flashing starts, but the verify step for all blocks fails - naturally. It looks like as every first byte in any multi byte read access is missing and all subsequent bytes are shifted in time by one place.

Has anyone reading this, ever observed that kind of fault and can give us any hint, which parameter of setup, either of the EMIFA unit, or clocks or anything else may be wrong? The funny thing ist, that the 16-bit version of the Flash works seamlessly, with the original AIS binary tools and drivers from the TI SDK, as well as with the version 2.40, downloaded, compiled and build from sources. It must be something wrong with the board, the flash chip of (most probably) with our software setup, but we have no idea what.

Thank you in advance for any hints

Horst

  • Hi Horst,

    We're looking into this.

    Can you provide the Linux SDK version you use and any debug (boot) logs you might have?

    Best Regards,
    Yordan
  • Hi Yordan,
    thank you for your reply. I've no particular answer to  your question, but some good news :-)

    'No particular answer':
    as I'm talking about the very first step of flashing, long before that image gets booted and is able to issue any linux boot messages. It's a low-level hardware/firmware problem and the only software involved is the TI Flash tool version 2.40, as I mentioned already.

    'Good news' because:
    Tuesday evening we got a second board (after three weeks of waiting) with that 8-Bit Flash mounted, instead of the 16-bit type.
    This board gets flashed - as far as we could investigate until now. The strings replied from the flash chip during initialisation of the flash procedure are correct, as expected by the notions in the data sheet. Subsequently the flash procedure runs successfully to it's end, all blocks get verified ok. We can erase the flash and re-program it afterwards without (obvious) issues.

    So we're rather sure, that that flash chip is defective.

    But the board still does not boot from this image - but this seems to be a different question and, very likely, a problem of the ROM boot loader configuration.
    Previously we used a 16-bit Flash and our circuit supplied a boot mode of 0x10 at the OMAP pins BOOT[0..7]. For loading the flash software via UART2 we use the boot mode 0x14. In order to switch between those, we use a single external signal, using a jumper for the first tries, then a GPIO of a USB/RS232 converter used for serial comm, to switch that single bit between 'Flashing (0x14)' and 'Run (0x10)' in our (later) production flash and test script.
    Now, with the 8-Bit Flash, we have to switch three bits at a time to toggle the boot mode between 0x14 and 0x0E for boot/run from the 8-Bit flash.
    I (try to) accomplish this by a single transistor as inverter, in order to switch BOOT[3] and BOOT[1] from High to Low and BOOT[4] from Low to High for downloading/flashing, while the normal state of boot mode pins for boot/run is 0x0E. I used 10k resistors to decouple the commonly switched boot mode lines from each other and checked the voltage levels using a multimeter for both states. The levels look ok, but we will check it more accurate using a four-channel oscilloscope today.
    The application note SPRAB41B we read already (weeks ago) and we think to have a pretty complete understanding of that matter and hope to proceed ahead these days.
    Further problems I will report and ask for - and a a happy note of successful completion also then, certainly.

    thank you again
    Horst