Skip to contentSkip to conversation

Issues when BDI2000 accesses the emtpy flash

U-Boot Spark Zhao 1 participant 1 message Feb 10, 2009

lore
Share & tools
lore

Spark Zhao

author
#0 lore raw

Hi, All

My platform is FSL8347, Flash : SPANSION S29GL01GP 128MB, base address 0xf8000000, RAM 256MB DDR2. BDI2000 with 1.22 firmware for MPC82xx/83xx/..

I erased the first sector of the flash, then tried to access the empty flash by the command "md 0xf8000000", it always report that "# SAP: read access failed".

I changed the bdi2000 config file with adding "RCW 0xA0500000 0x08040000", but when I dump the register it displayed

rcwlr: 0x00000000 0

rcwhr: 0x00000000 0

and the flash still can't be accessed, can anyone please help?

Below is what I got from the bdi2000 shell:

- CONFIG: loading configuration file passed

- CONFIG: loading register definition passed

- TARGET: processing user reset request

- BDI asserts HRESET

- Reset JTAG controller passed

- Bypass check: 0x00000001 => 0x00000001

- JTAG exists check passed

- BDI overrides HRCW (0xA0500000 0x08040000)

- BDI removes HRESET

- Target PVR is 0x80830031

- Target SVR is 0x80500030

- BDI sets breakpoint at 0x00000100

- BDI resumes program execution

- Waiting for target stop passed

- TARGET: Target PVR is 0x80830031

- TARGET: resetting target passed

- TARGET: processing target startup ....

- TARGET: processing target startup passed

My config file as below:

; bdiGDB configuration file for MPC8349E-QS board

[INIT]

; init core register

WREG MSR 0x3000 ;MSR : ME,RI

; Move MBAR to 0xe0000000

WM32 0xff400000 0xe0000000 ;MABR to 0xe0000000

;

; Initialize LAWBAR's

WM32 0xe0000020 0xe0000000 ;LBLAWBAR0 : Flash

WM32 0xe0000024 0x8000001A ;LBLAWAR0

WM32 0xe0000028 0xF8000000 ;LBLAWBAR1 : BCSR

WM32 0xe000002C 0x8000001A ;LBLAWAR1

WM32 0xe0000030 0xf8000000 ;LBLAWBAR2 : SDRAM

WM32 0xe0000034 0x8000000e ;LBLAWAR2

WM32 0xe0000038 0xf0000000 ;LBLAWBAR3

WM32 0xe000003c 0x80000019 ;LBLAWAR3

WM32 0xe00000A0 0x00000000 ;DDRLAWBAR0 : DDR Main SODIMM

WM32 0xe00000A4 0x8000001A ;DDRLAWAR0

WM32 0xe00000A8 0x10000000 ;DDRLAWBAR1

WM32 0xe00000AC 0x8000001b ;DDRLAWAR1

;

; Setup DDR

WM32 0xe0000128 0x73000002 ;

WM32 0xe0002000 0x00000007 ;CS0_BNDS

WM32 0xe0002008 0x00000000 ;CS1_BNDS

WM32 0xe0002010 0x00000007 ;CS2_BNDS

WM32 0xe0002018 0x0008000f ;CS3_BNDS

WM32 0xe0002080 0x80840102 ;CS0_CONFIG

WM32 0xe0002084 0x00000000 ;CS1_CONFIG

WM32 0xe0002088 0x80000101 ;CS2_CONFIG

WM32 0xe000208C 0x80000101 ;CS3_CONFIG

WM32 0xe0002104 0x00220802 ;TIMING_CFG_0

WM32 0xe0002108 0x26256222 ;TIMING_CFG_1

WM32 0xe000210C 0x0f9028c7 ;TIMING_CFG_2

WM32 0xe0002100 0x00000000 ;TIMING_CFG_3

WM32 0xe0002110 0x43080000 ;DDR_CFG

WM32 0xe0002114 0x00601000 ;DDR_CFG_2

WM32 0xe0002118 0x44400232 ;DDR_MODE

WM32 0xe000211C 0x8000C000 ;DDR_SDRAM_MODE_2

WM32 0xe0002124 0x04100100 ;DDR_INTERVAL

WM32 0xe0002130 0x02000000 ;DDR_CLK_CNTL

DELAY 200

WM32 0xe0002110 0xC3080000 ;DDR_CFG

;

; Setup chip selects

WM32 0xe0005004 0xF8006ff7 ;OR0 : Flash

WM32 0xe0005000 0xF8000801 ;BR0 : Flash

WM32 0xe000500C 0xffffe9f7 ;OR1 : BCSR

WM32 0xe0005008 0xf8000801 ;BR1 : BCSR

;WM32 0xe0005014 0xfc006901 ;OR2 : SDRAM

;WM32 0xe0005010 0xf0001861 ;BR2 : SDRAM

;

; Enable flash programming

WM8 0xE2400001 0x0C ;BCSR

WM16 0xF8000000 0x0060 ;Flash

WM16 0xF8000000 0x00D0

DELAY 1000

WM16 0xF8000000 0xFFFF

[TARGET]

CPUTYPE 8347 ;the CPU type

JTAGCLOCK 0 ;use 16 MHz JTAG clock

POWERUP 2000 ;start delay after power-up detected
in ms

WAKEUP 500 ;give reset time to complete

STARTUP RESET ;halt immediately at the boot vector

RCW 0xA4500000 0x08040000 ;override reset configuration words

BOOTADDR 0x00000100 ;boot address used for start-up
break

BREAKMODE SOFT ;SOFT or HARD, HARD uses PPC
hardware breakpoint

STEPMODE HWBP ;TRACE or HWBP, HWBP uses a hardware
breakpoint

;MMU XLAT 0xc0000000 ;enable address translation

;SIO 8023 115200

[HOST]

IP 192.168.1.100

FILE D:\Temp\BDI2000_LOG\dump.log

FORMAT BIN 0x10000

DUMP dump.bin

LOAD MANUAL ;load code MANUAL or AUTO after reset

PROMPT 8347>

[FLASH]

CHIPTYPE MIRRORX8 ;Flash type: Spansion S29GL01GP

CHIPSIZE 0x8000000 ;The size of one flash chip in bytes 128M

BUSWIDTH 8 ;The width of the flash memory bus in bits (8 | 16 |
32 | 64)

;WORKSPACE 0x1000000 ;workspace in DDR RAM

FILE D:\Temp\BDI2000\dump.bin

FORMAT BIN 0xf8000000

;ERASE 0xf8000000 ;erase sector 8

;ERASE 0xf8120000 ;erase sector 9

;ERASE 0xf8140000 ;erase sector 10

;ERASE 0xf8160000 ;erase sector 11

[REGS]

FILE $reg8349e.def