Hi,
I have a T2081 NXP processor connected to an external NAND Flash MT29F64G08AECAB via IFC.
My goal is to run diagnostic test on this NAND Flash on code warrior or simply read the device and manufacturer ID of this device on Code Warrior (for which I have written the code).
To achieve this goal, I have done the following already:
1. Configured LAW for the NAND IFC in the generated T2081QDS_init_core.tcl starting from 0xFF800000 and of size 1MB.
## LAW3 to IFC - NAND
# LAWBARH
mem [CCSR_ADDR 0x000C30] = 0x00000000
# LAWBARL
mem [CCSR_ADDR 0x000C34] = 0xFF800000
# LAWAR
mem [CCSR_ADDR 0x000C38] = 0x81F00013
2. Also have configured the CSPR and FTIM registers corresponding to NAND like below :
set NAND_CS 5
# NAND Flash, addr 0xFF800000, 1MB size, 8-bit NAND, ECC disable
# CSPR_EXT
mem [CCSR_ADDR [expr 0x12400C + $NAND_CS * 0x0C]] = 0x00000000
# CSPR
mem [CCSR_ADDR [expr 0x124010 + $NAND_CS * 0x0C]] = 0xFF800103
# AMASK
mem [CCSR_ADDR [expr 0x1240A0 + $NAND_CS * 0x0C]] = 0xFFFF0000
# CSOR
mem [CCSR_ADDR [expr 0x124130 + $NAND_CS * 0x0C]] = 0x01082100
# IFC_FTIM0
mem [CCSR_ADDR [expr 0x1241C0 + $NAND_CS * 0x30]] = 0x1E0B0507
# IFC_FTIM1
mem [CCSR_ADDR [expr 0x1241C4 + $NAND_CS * 0x30]] = 0x2929090B
# IFC_FTIM2
mem [CCSR_ADDR [expr 0x1241C8 + $NAND_CS * 0x30]] = 0x01203819
# IFC_FTIM3
mem [CCSR_ADDR [expr 0x1241CC + $NAND_CS * 0x30]] = 0x15000000
Note that there are 2 chip selects (CS5 and CS6) going from the processor to NAND and for the time being I am trying to access the first 4GB and hence configuring CS5 only.
3. Configured TLB:
fine 1M TLB entry 5 : 0xFF800000 - 0xFF8FFFFF for NAND cache-inhibited, guarded
reg ${CAM_GROUP}L2MMU_CAM5 = 0x5000000A1C08000000000000FF80000000000000FF800001
4. And since the device support for this MT29F64G08AECAB could not be found in the installed directory, I followed the manual and created a .xml for this device (for 4GB) which I have attached here.
After doing all of this, when I run the diagnostic test for the NAND device on code warrior, I get the below error:
As an alternative I tried to write a simple C code to read back the device id from this device. So I wrote the below code in code warrior and I have attached it here. And as a result when I read back the IFC_NAND_MDR register I get back 0x124E0000 which is not matching with the Device ID.
I would like to know if I am doing something wrong or missing out something because I am unable to run the diagnostic test or read back the device id.
I have attached the respective T2081QDS_init_core.tcl and also the respective schematics for reference.
Regards,
Nisarga R