关于sjf4510源程序的一些问题?
我在看陈猛写的sjf4510源程序时,有些问题不明白,请斑竹和高手指点:(1)pin4510.h中
#define S4510_MAX_CELL_INDEX 233 //the number of internal pads
//DATA BUS
#define DATA0_31_CON (127) //1-input, 0-output
#define DATA0_IN (126)
#define DATA0_OUT (125)
#define DATA1_IN (124)
#define DATA1_OUT (123)
#define DATA2_IN (122)
#define DATA2_OUT (121)
#define DATA3_IN (120)
#define DATA3_OUT (119)
#define DATA4_IN (118)
#define DATA4_OUT (117)
#define DATA5_IN (116)
#define DATA5_OUT (115)
#define DATA6_IN (114)
#define DATA6_OUT (113)
#define DATA7_IN (112)
#define DATA7_OUT (111)
#define DATA8_IN (110)
#define DATA8_OUT (109)
#define DATA9_IN (108)
#define DATA9_OUT (107)
#define DATA10_IN (106)
#define DATA10_OUT (105)
#define DATA11_IN (104)
#define DATA11_OUT (103)
#define DATA12_IN (102)
#define DATA12_OUT (101)
#define DATA13_IN (100)
#define DATA13_OUT (99)
#define DATA14_IN (98)
#define DATA14_OUT (97)
#define DATA15_IN (96)
#define DATA15_OUT (95)
#define DATA16_IN (94)
#define DATA16_OUT (93)
#define DATA17_IN (92)
#define DATA17_OUT (91)
#define DATA18_IN (90)
#define DATA18_OUT (89)
#define DATA19_IN (88)
#define DATA19_OUT (87)
#define DATA20_IN (86)
#define DATA20_OUT (85)
#define DATA21_IN (84)
#define DATA21_OUT (83)
#define DATA22_IN (82)
#define DATA22_OUT (81)
#define DATA23_IN (80)
#define DATA23_OUT (79)
#define DATA24_IN (78)
#define DATA24_OUT (77)
#define DATA25_IN (76)
#define DATA25_OUT (75)
#define DATA26_IN (74)
#define DATA26_OUT (73)
#define DATA27_IN (72)
#define DATA27_OUT (71)
#define DATA28_IN (70)
#define DATA28_OUT (69)
#define DATA29_IN (68)
#define DATA29_OUT (67)
#define DATA30_IN (66)
#define DATA30_OUT (65)
#define DATA31_IN (64)
#define DATA31_OUT (63)
//ADDR BUS & CONTROL LINE
#define ADDR_CS_RW_CON (184) //sbz for output
#define ADDR0 (149)
#define ADDR1 (148)
#define ADDR2 (147)
#define ADDR3 (146)
#define ADDR4 (145)
#define ADDR5 (144)
#define ADDR6 (143)
#define ADDR7 (142)
#define ADDR8 (141)
#define ADDR9 (140)
#define ADDR10 (139)
#define ADDR11 (138)
#define ADDR12 (137)
#define ADDR13 (136)
#define ADDR14 (135)
#define ADDR15 (134)
#define ADDR16 (133)
#define ADDR17 (132)
#define ADDR18 (131)
#define ADDR19 (130)
#define ADDR20 (129)
#define ADDR21 (128)
//CONTROL LINE
#define nOE (178)
#define nECS0 (183)
#define nECS1 (182)
#define nECS2 (181)
#define nECS3 (180)
#define nRCS0 (175)
#define nRCS1 (169)
#define nRCS2 (168)
#define nRCS3 (167)
#define nRCS4 (166)
#define nRCS5 (165)
#define nRAS0 (164)
#define nRAS1 (163)
#define nRAS2 (162)
#define nRAS3 (161)
#define nCAS0 (160)
#define nCAS1 (159)
#define nCAS2 (158)
#define nCAS3 (157)
#define nDWE (156)
#define nWBE0 (155)
#define nWBE1 (154)
#define nWBE2 (153)
#define nWBE3 (152)
#define PP7_CON (39)
#define PP7_IN (41)
#define PP7_OUT (40)
#define PP6_CON (42)
#define PP6_IN (44)
#define PP6_OUT (43)
#define PP5_CON (45)
#define PP5_IN (47)
#define PP5_OUT (46)
#define PP4_CON (48)
#define PP4_IN (50)
#define PP4_OUT (49)
#define PP3_CON (51)
#define PP3_IN (53)
#define PP3_OUT (52)
#define PP2_CON (54)
#define PP2_IN (56)
#define PP2_OUT (55)
#define PP1_CON (57)
#define PP1_IN (59)
#define PP1_OUT (58)
#define PP0_CON (60)
#define PP0_IN (62)
#define PP0_OUT (61)
这些定义是怎么来的??
(2)39vf160.c中
void NOR_WrHW(U32 addr,U16 data)
{
S4510_SetPin(DATA0_31_CON ,LOW);
S4510_SetAddr(addr);
S4510_Assert_nGCS(addr);
S4510_SetDataHW(data);
JTAG_ShiftDRStateNoTdo(outCellValue); //tCOS
S4510_SetPin(nWBE0,LOW);
JTAG_ShiftDRStateNoTdo(outCellValue);
S4510_SetPin(nWBE0,HIGH);
JTAG_ShiftDRStateNoTdo(outCellValue); //tCOH
S4510_SetPin(DATA0_31_CON ,HIGH); //nBE is deasserted here.
S4510_Deassert_nGCS(addr);
JTAG_ShiftDRStateNoTdo(outCellValue);
}
short NOR_RdHW(U32 addr)
{
S4510_SetPin(DATA0_31_CON ,HIGH);
S4510_SetAddr(addr);
S4510_Assert_nGCS(addr);
S4510_SetPin(nOE,LOW);
JTAG_ShiftDRStateNoTdo(outCellValue);
S4510_SetPin(nOE,HIGH);
S4510_Deassert_nGCS(addr);
JTAG_ShiftDRState(outCellValue,inCellValue);
return S4510_GetDataHW();
}
我不明白如何通过jtag把指令发送到lumit4510中执行??
(3)在看lumit4510v1.4电路图中,其中画的关于Nor Flash和我拿到的开发板的实物不一样,而我的开发板实物和DIY手册是一样的,请斑竹能否解释一下?
谢谢!! :?
注:附件是源程序!! 关于 jtag 烧写 Flash 方面的源码分析和原理说明, SkyEye 的那本书第八章里有我写的一个小节专门讨论这个问题的。可以找来看一下。:-)
你拿到的开发板的实物 NorFlash 是什么样的,和原理图里画的有何不同? 可以描述一下吗? 谢谢斑竹! :-D
我看了你写的第8章关于Jflash程序相关接口分析部分内容,并从网上下载了源程序。此外在www.lumit.org网站上下载了s3c4510的bsdl文件。这样对照着看就容易多了!
关于开发板的实物 NorFlash 是SST39VF1601,而原理图上画的是SST39VF320。
此外,还有一些细微差别。开发板的NorFlash实物和DIY手册描述一致,实物如下:
U1:SST39VF160
U4:74HC08
CM1,CM18,CM33
而原理图中有数十个电容。请斑竹查阅!! 嗯, S3C4510 这个芯片据说是快要停产了,不用深究技术细节,大致能看懂逻辑意义就够了。
160 和 320 的差别是存储容量,原理图上应该都可以兼用。
电容是硬件问题啦,我不太懂,不过据 zhaoic 告诉我,电容少几个没什么关系的 :lol:
页:
[1]