Hi Team,
I am currently trying to add a new flash device in codewarrior. Based on the "Adding new device in codewarrior" document i have added the device but when i try to program through that device i am not able to successfully program it.
In codewarrior it is just running in loop as "executing the program..........".
for reference i am sharing the xml file in the form of image which i have created for adding new device.
Please can you suggest me what could be the issue?
Thanks & Regards
Irfan
Solved! Go to Solution.
Please refer to "IFC memory map" in section "13.3 IFC memory map/register definition" in T2080RM.pdf.
I assume that you are using T series processor.
In CodeWarrior initialization file, you need to calculate and configure IFC NOR flash timing according the datasheet of your NOR flash.
Please refer to the following document.
Hi Yipingwang,
As you had suggested me i tried to calculate and configure IFC but i have one query here.
# 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]] = 0xFF800083
# AMASK
mem [CCSR_ADDR [expr 0x1240A0 + $NAND_CS * 0x0C]] = 0xFFFF0000
# CSOR
mem [CCSR_ADDR [expr 0x124130 + $NAND_CS * 0x0C]] = 0x01082100
the above code is from init_sram.tcl file .
can you please help me in understanding what are this values
1. 0x12400C
2. 0x0C
Thanks & regards
Irfan
Hi Yipingwang,
Thanks for the support.
Actually i tried by modfying the init_sram.tcl file according to the documents you had shared. but i couldnt perform program action in NOR flash.
For reference i am sharing the logs, nor_device.xml file and datasheet of the nor device.
this below data i have modified according to IFC memory map and flash timing calculation
# NOR Flash, addr 0xE8000000, 128MB size, 16-bit NOR
# CSPR_EXT
mem [CCSR_ADDR [expr 0x12400C + $NOR_CS * 0x0C]] = 0x00000000
# CSPR
mem [CCSR_ADDR [expr 0x124010 + $NOR_CS * 0x0C]] = 0xE8000101
# AMASK
mem [CCSR_ADDR [expr 0x1240A0 + $NOR_CS * 0x0C]] = 0xF0000000
# CSOR
mem [CCSR_ADDR [expr 0x124130 + $NOR_CS * 0x0C]] = 0x00000000
# IFC_FTIM0
mem [CCSR_ADDR [expr 0x1241C0 + $NOR_CS * 0x30]] = 0x10010020
# IFC_FTIM1
mem [CCSR_ADDR [expr 0x1241C4 + $NOR_CS * 0x30]] = 0x38001302
# IFC_FTIM2
mem [CCSR_ADDR [expr 0x1241C8 + $NOR_CS * 0x30]] = 0x011C381C
# IFC_FTIM3
mem [CCSR_ADDR [expr 0x1241CC + $NOR_CS * 0x30]] = 0x00000000
can you please suggest me what could be wrong that it is not performing the operation?
thanks in advance.
Thanks & regards
Irfan
Please pay attention "Clock Frequency" setting in NorIFCParams sheet in the flash memory timing table, please fill it according to your target board.
Hi Yipingwang,
Thanks for your quick response.
Actually we are not using any clock for IFC. But still i will cross check this parameter once.
Also when i am trying to perform Erase command in NOR flash i am getting "Sector protection error" whereas in NAND flash i am getting "Device protection error".
I have given "0" as WP value in CPSR register, and i have performed unprotect command in NOR flash whereas in NAND flash unprotect command is not supported but still i am getting the above error.
Can you please suggest me what is the issue?
Thanks & regards
Irfan
Please specify proper clock for IFC modules.
Hi Yipingwang,
Thanks for your quick response.
We are not using any Clock from IFC controller. Is it possible without IFC clock can we flash NOR and NAND connected to IFC.
Thanks & regards
irfan.
It's impossible to use CodeWarrior to program NOR/NAND flash without IFC clock.
Please refer to "IFC memory map" in section "13.3 IFC memory map/register definition" in T2080RM.pdf.
Hi Yipingwang,
Yes we are using QORIQ T-Series (T2081) based board as reference and created a custom board.
Thanks & Regards,
Irfan
Hi Yipingwang,
Thanks for your quick response.
I will try this and get back to you if i face any issue.
Thanks & Regards,
Irfan