在线时间0 小时
UID182080
注册时间2010-4-16
NXP金币0
该用户从未签到
新手上路

- 积分
- 5
- 最后登录
- 1970-1-1
|
说明 BDI3000 GDB for PPC版本开发板 8313E RDB REVA4 版本 8M NorFlash的系统资源 Start End Definition 0x0000_0000 0x07ff_ffff DDR2 SDRAM 0x8000_0000 0x8fff_ffff PCI memory 0x9000_0000 0x9fff_ffff PCI_MMIO 0xe000_0000 0xe00f_ffff IMMR 0xe200_0000 0xe20f_ffff PCIIO 0xe280_0000 0xe280_7fff NAND flash 0xfe00_0000 0xfe7f_ffff NOR flash The flash starts at address 0xfe000000. Start End Definition 0xfe00_0000 0xfe0f_ffff U-Boot 0xfe10_0000 0xfe2f_ffff Linux kernel 0xfe30_0000 0xfe6f_ffff Ramdisk/JFFS2 file system 0xfe70_0000 0xfe70_ffff OF tree 0xfe71_0000 0xfe72_ffff Vitesse 7385 image_loader program 0xfe73_0000 0xfe7f_dfff Reserved 0xfe7f_e000 0xfe7f_ffff Vitesse 7385 firmware image BDI配置文件 参照CodeWarrier的修改 如下:[INIT];setMMRBaseAddr 0xFF400000;WREG MBAR 0xFF400000; change internal MMR base from 0xff400000 (reset value) to 0xe0000000WM32 0xff400000 0xe0000000 ;setMMRBaseAddr 0xe0000000;WREG MBAR 0xe0000000;#############################################; System Configuration - Local Access Windows ;#############################################; Local Bus Local Access Windows;################################; WINDOW 0 - NOR FLASHWM32 0xe0000020 0xfe000000 ; LBLAWBAR0 - begining at 0xfe000000 WM32 0xe0000024 0x80000018 ; LBLAWAR0 - enable, size = 32MB ; WINDOW 1 - NAND FlashWM32 0xe0000028 0xf8000000 ; LBLAWBAR1 - begining at 0xf8000000WM32 0xe000002c 0x80000018 ; LBLAWAR1 - enable, size = 32MB ; WINDOW 2 - VSC7385WM32 0xe0000030 0xf0000000 ; LBLAWBAR2 - begining at 0xfc100000WM32 0xe0000034 0x80000010 ; LBLAWAR2 - enable, size = 128kB; WINDOW 3 - Read Write BufferWM32 0xe0000038 0xfa000000 ; LBLAWBAR3 - begining at 0xfa000000WM32 0xe000003c 0x8000000e ; LBLAWAR3 - enable, size = 32kB; PCI Local Access Windows;#################################; WINDOW 0WM32 0xe0000060 0x80000000 ; PCILAWBAR0 - begining at 0x80000000WM32 0xe0000064 0x8000001c ; PCILAWAR0 - enable, size = 512MB; WINDOW 1WM32 0xe0000068 0xa0000000 ; PCILAWBAR1 - begining at 0xa0000000WM32 0xe000006c 0x8000001c ; PCILAWAR1 - enable, size = 512MB; DDR Local Access Windows;#################################; WINDOW 0 - 1st DDR SODIMMWM32 0xe00000a0 0x00000000 ; DDRLAWBAR0 - begining at 0x00000000WM32 0xe00000a4 0x8000001a ; DDRLAWAR0 - enable, size = 128MB; #********************************* ; DDR2 Controller Registers; #********************************* ;DDRCDR WM32 0xE0000128 0x73000002 ; DDR_SDRAM_CLK_CNTL ; CLK_ADJST = b'010' ; 2 Clocks WM32 0xE0002130 0x02000000 ; CS0_BNDS ; SA0 = b'000000000000' ; EA0 = b'000000000111' WM32 0xE0002000 0x00000007 ;# 128MB ; CS0_CONFIG ; CS_0_EN = b'1' ; AP_0_EN = b'1' ; ODT_RD_CFG = b'0' ; ODT_WR_CFG = b'1' ; BA_BITS_CS_0 = b'00' ; ROW_BITS_CS_0 = b'001' ; 13 row bits ; COL_BITS_CS_0 = b'010' ; 10 columns bits WM32 0xE0002080 0x80840102 ; TIMING_CFG_3 ; EXT_REFREC = b'000' ; 0 Clocks WM32 0xE0002100 0x00000000 ; TIMING_CONFIG_1 ; bit 1-3 = 2 - PRETOACT precharge activate interval 2 clock cycles ; bit 4-7 = 6 - ACTTOPRE activate to precharge interval 6 clock cycles ; bit 9-11 = 2 = ACTTORW activate to r/w interval 2 clock cycles ; bit 13 - 15 = 5 - CASLAT CAS latency 3 clock cycles ; bit 16 - 19 = 6 - REFREC refresh recovery time 14 clock cycles ; bit 21 - 23 = 2 - WRREC data to precharge interval 2 clock cycles ; bit 25 - 27 = 2 - ACTTOACT activate to activate interval 2 clock cycles ; bit 29 - 31 = 2 - WRTORD write data to read command interval 2 clock cycles WM32 0xe0002108 0x26256222 ; TIMING_CONFIG_2 ; bit 19-21 = b010 - WR_DATA_DELAY - 1/2 DRAM clock delay WM32 0xe000210C 0x0f9028c7 ; TIMING_CFG_0 ; RWT = b'00' ; 0 Clocks ; WRT = b'00' ; 0 Clocks ; RRT = b'00' ; 0 Clocks ; WWT = b'00' ; 0 Clocks ; ACT_PD_EXIT = b'010' ; 2 Clocks ; PRE_PD_EXIT = b'010' ; 2 Clocks ; ODT_PD_EXIT = b'1000' ; 8 Clocks ; MRS_CYC = b'0010' ; 2 Clocks WM32 0xE0002104 0x00220802 ; DDR_SDRAM_CFG ; MEM_EN = b'0' ; SREN = b'1' ; RD_EN = b'0' ; SDRAM_TYPE = b'011' ; DYN_PWR = b'0' ; 32_BE = b'1' ; 8_BE = b'0' ; NCAP = b'0' ; 2T_EN = b'0' ; x32_EN = b'0' ; PCHB8 = b'0' ; HSE = b'0' ; MEM_HALT = b'0' ; BI = b'0' WM32 0xE0002110 0x43080000 ; DDR_SDRAM_CFG_2 ; FRC_SR = b'0' ; DQS_CFG = b'00' ; ODT_CFG = b'10' ; NUM_PR = b'0001' ; D_INIT = b'0' WM32 0xE0002114 0x00401000 ; DDR_SDRAM_MODE ; Extended Mode Register: Outputs=0 or 1? ; Mode Register WM32 0xE0002118 0x44400232 ; DDR_SDRAM_MODE_2 ; Extended Mode Register 2 ; Extended Mode Register 3 WM32 0xE000211C 0x8000c000 ; DDR_SDRAM_INTERVAL ; REFINT = 800 Clocks ; BSTOPRE = 100 Clocks WM32 0xE0002124 0x03200064 ;delay before enable DELAY 300 ;Enable: DDR_SDRAM_CFG WM32 0xE0002110 0xc3080000;##############################################; Local Bus Interface (LBIU) Configuration;##############################################; CS0 - 8MB NOR FLASH WM32 0xe0005000 0xfe001001 ; BR0 base address at 0xFE000000, port size 16 bit, GPCM, validWM32 0xe0005004 0xfe006ff7 ; OR0 8MB flash size, 15 w.s., timing relaxed; CS1 - NAND FLASH WM32 0xE0005008 0xF8000C21 ; BR1 base address at 0xF8000000, port size 8 bit, FCM, validWM32 0xE000500c 0xFFFF83CC ; OR1 32KB flash size, small page;for a Rev A board, please comment the line above and use the below initialization for OR1:;WM32 0xE000500c 0xFFFF93CC ; OR1 32KB flash size, small page; CS2 - VSC7385WM32 0xe0005010 0xf0000801 ; BR2 base address at 0xF0000000, port size 8 bit, GPCM, validWM32 0xe0005014 0xFFFE09FF ; OR2 128KB; CS3 - Read Write BufferWM32 0xe0005018 0xfa000801 ; BR3 base address at 0xfa000000, port size 8 bit, GPCM, validWM32 0xe000501c 0xFFFF8FF7 ; OR3 32KB; LBCR - local bus enableWM32 0xe00050d0 0x00000000; LCRR; bit 14 - 15 = 0b11 - EADC - 3 external address delay cycles ; bit 28 - 31 = 0x0010 - CLKDIV - system clock:memory bus clock = 2WM32 0xe00050d4 0x00030002WREG MSR 0x2000 ;;writereg MSR 0x2000 ; FP available, machine check disable, exception vectors at 0x0000_0000WM32 0xE0000800 0x00000000 ; ACR - Enable CoreWM32 0xfa000000 0x00000000 ; write board LEDs;; NAND Flash settings;WM32 0xE00050E0 0x0000E000 ; FMR; MRTPR - refresh timer prescalerWM32 0xe0005084 0x20000000 ;WREG SP 0xf[TARGET]CPUTYPE 8313 ;the CPU typeJTAGCLOCK 0 ;use 16 MHz JTAG clockPOWERUP 1000WAKEUP 100BOOTADDR 0x000100;RCW 0xa4700000 0x04230000 ;override reset configuration wordsSTARTUP RESET ;halt immediately at the boot vectorBREAKMODE HARD ;SOFT or HARD, HARD uses PPC hardware breakpointSTEPMODE HWBP ;TRACE or HWBP, HWBP uses a hardware breakpointMMU XLAT 0xC0000000 ;enable virtual address modePTBASE 0x000000f0 ;here is the pointer to the page table pointers;[HOST]IP 192.168.6.33;FILE FORMAT SRECLOAD MANUAL ;load code MANUAL or AUTO after resetPROMPT 8313_RDB>;[FLASH]CHIPTYPE AM29BX16 ; MIRRORX16 Flash type: Micron Q-Flash MT28F640J3CHIPSIZE 0x800000 ;The size of one flash chip in bytesBUSWIDTH 16 ;The width of the flash memory bus in bits (8 | 16 | 32 | 64);WORKSPACE 0x1000 ;workspace in DDR RAMFILE $u-boot.binFORMAT BIN 0xfe000000;ERASE 0xfff00000 ;erase sector 8;ERASE 0xFFF20000;ERASE 0xFFF40000;ERASE 0xFFF60000;ERASE 0xFFF80000;ERASE 0xFFFa0000;ERASE 0xFFFc0000;ERASE 0xFFFe0000;ERASE 0xfe100000 ;erase sector 8;ERASE 0xfe120000 ;erase sector 9;ERASE 0xfe140000 ;erase sector 10;ERASE 0xfe160000 ;erase sector 11;ERASE 0xfe100000 0x20000 3 ; erase 3 sectors[REGS]FILE $reg8313e.def现在问题是无法编程Nor Flash,也无法擦除Flash,解锁命令也老是不对,都说不是命令错误就是参数错误。313_RDB>info Target CPU : MPC83xx (e300c3) Target state : debug mode Debug entry cause : COP halt Current PC : 0xfff00100 Current CR : 0x00000000 Current MSR : 0x00002000 Current LR : 0x00000000 Current MBAR : 0xe00000008313_RDB>reset- TARGET: processing user reset request- BDI asserts HRESET- Reset JTAG controller passed- Bypass check: 0x00000001 => 0x00000001- JTAG exists check passed- IDCODE is 0x0687001D- BDI removes HRESET- PVR is 0x80850010- SVR is 0x80B00010- BDI sets breakpoint at 0x00000100- BDI resumes program execution- COP status is 0x01- Waiting for target stop failed- TARGET: Break at boot vector failed, freeze forced- TARGET: Target PVR is 0x80850010- TARGET: resetting target passed- TARGET: processing target startup ....- TARGET: processing target startup passed8313_RDB>UNLOCK 0xfe000000 0x10000 8Unlocking flash at 0xfe000000# Invalid parameter for flash programming8313_RDB>erase 0xfe000000 0x10000 8 UNLOCK# syntax error in command反正就是出现无法编程NOR flash的情况??谁帮忙解惑 一下,第一次接触PPC开发BDI也不是很熟悉,
|
|