If a hardware system is designed like Figure 6-13 C6745/6747 Connection Diagram: SDRAM, NOR, NAND-----(P83,at TMS320C6745/6747 Floating-point Digital Signal Processor,TMS320C6745.pdf).the GPIO pins from GP4[0] to GP4[5] are used as the upper address lines. I choose SST39VF800A Flash made by SST.The steps to access the XOR Flash as follow:
1.System Configuration
#define PINMUX0V 0x00000000
#define PINMUX1V 0x00000000
#define PINMUX2V 0x00000000
#define PINMUX3V 0x00000000
#define PINMUX4V 0x00000000
#define PINMUX5V 0x88888888
#define PINMUX6V 0x88888888
#define PINMUX7V 0x00000000
#define PINMUX8V 0x20000000
#define PINMUX9V 0x00000002
#define PINMUX10V 0x00000000
#define PINMUX11V 0x00001100
#define PINMUX12V 0x88880000
#define PINMUX13V 0x11888888
#define PINMUX14V 0x11111111
#define PINMUX15V 0x11111111
#define PINMUX16V 0x11111111
#define PINMUX17V 0x11111111
#define PINMUX18V 0x11111111
#define PINMUX19V 0x00000001
*(int *) KICK0R =0x83e70b13;
*(int *) KICK1R =0x95A4F1E0;
*(int *) PINMUX5 =PINMUX5V;
*(int *) PINMUX6 =PINMUX6V;
*(int *) PINMUX8 =PINMUX8V;
*(int *) PINMUX9 =PINMUX9V;
*(int *) PINMUX11 =PINMUX11V;
*(int *) PINMUX12 =PINMUX12V;
*(int *) PINMUX13 =PINMUX13V;
*(int *) PINMUX14 =PINMUX14V;
*(int *) PINMUX15 =PINMUX15V;
*(int *) PINMUX16 =PINMUX16V;
*(int *) PINMUX17 =PINMUX17V;
*(int *) PINMUX18 =PINMUX18V;
*(int *) PINMUX19 =PINMUX19V;
*(int *) KICK1R =0x88888888;
2..configure thetregisters of CE2CFG and EMIFA_NANDFCR
*(unsigned int *) CE2CFG =0x88644329;
*(unsigned int *) EMIFA_NANDFCR &= ~1;
3. comfigure GPIO pins from GP4[0] to GP4[5]
*(int *) DIR45 =0xFFFFFFC0;
4.enter and read flash software ID
#define Flash_Addr1 (unsigned int)( 0x60005555)
#define Flash_Addr2 (unsigned int)( 0x60002aaa)
#define GPIO_Addr 0x01E26064
*(unsigned int *)(GPIO_Addr)=Flash_Addr1>>13;
*(unsigned int *)(Flash_Addr1) =0x00aa;
*(unsigned int *)(GPIO_Addr)=Flash_Addr2>>13;
*(unsigned int *)(Flash_Addr2) =0x0055;
*(unsigned int *)(GPIO_Addr)=Flash_Addr1>>13;
*(unsigned int *)(Flash_Addr1) =0x0090;
*(unsigned int *)(GPIO_Addr)=0;
Flash_Mv =*(unsigned int *) 0x60000000;
Flash_Id =*(unsigned int *) 0x60000001;
Question:
Finally,DSP can not access the flash, I want to know what is wrong about the steps or the codes?
Thanks
sky