* Flash programming using a BDI2000 on a MPC8248 CPU
@ 2006-11-06 8:42 Laurent Pinchart
2006-11-06 11:11 ` Adrian Cox
0 siblings, 1 reply; 6+ messages in thread
From: Laurent Pinchart @ 2006-11-06 8:42 UTC (permalink / raw)
To: linuxppc-embedded
Hi everybody,
I'm having problems using my BDI2000 to program an external flash on a MPC8248
board. I contacted Abatron's technical support (through its French
distributor, as nobody at Abatron seems to speak English or French). They
haven't been able to provide a solution (they really don't seem to care)
after more than a month, so I'm hoping to find some help here.
I can't get the BDI2000 to program the flash using the internal workspace
(fast algorithm) on a blank flash.
What works:
- Programming the flash without using the internal workspace (slow, JTAG-only
algorithm).
- Programming the flash using the internal workspace ONLY WHEN the flash has
already been programmed with a valid U-Boot copy, and the breakpoint
specified in the BDI2000 configuration file (BOOTADDR) is set to a wrong
value.
What doesn't work:
- Programming the flash using the internal workspace when the flash is empty.
- Programming the flash using the internal workspace when the flash has
already been programmed with a valid U-Boot copy, and the breakpoint
specified in the BDI2000 configuration file (BOOTADDR) is set to the right
value.
When the reset breakpoints fails (BOOTADDR set to 0x00000100 instead of
0xFFF00100 for instance), U-Boot starts to initialize the board before the
BDI2000 freezes the CPU. I assume that must be the reason why programming the
flash using the internal workspace then works. I tried having a look at the
U-Boot startup code, and initializing the same registers in the BDI2000
configuration file, but without success. I probably missed something.
Here is my BDI2000 configuration file. The hardware reset configuration word
is set to 0x00000000.
-----------------------------------------------------------------------------
[INIT]
WREG MSR 0x00000000
WM32 0x00010004 0xffff2081 ; SYPCR
WM32 0x00010024 0x00000000 ; BCR
WM32 0x00010000 0x82240000 ; SIUMCR
WM32 0x00010c80 0x00000001 ; SCCR
WM32 0x000119c4 0x00000000 ; RCCR
; Initialize the flash memory controller
WM32 0x00010100 0x40001001 ; BR0
WM32 0x00010104 0xf8000834 ; OR0
[TARGET]
CPUTYPE 8260 ; the CPU type (603EV,750,8240,8260)
JTAGCLOCK 0 ; use 16 MHz JTAG clock
BOOTADDR 0xFFF00100
BDIMODE AGENT ; the BDI working mode
BREAKMODE SOFT ; SOFT or HARD
VECTOR CATCH ; catch unhandled exceptions
DCACHE NOFLUSH ; data cache flushing (FLUSH | NOFLUSH)
SIO 2002 115200
[FLASH]
CHIPTYPE MIRRORX16 ; Flash type
CHIPSIZE 0x1000000 ; The size of one flash chip in bytes
BUSWIDTH 16 ; The width of the flash memory bus in bits
ERASE 0x40000000 CHIP
FILE u-boot.bin
FORMAT BIN
;WORKSPACE 0x00008000
[HOST]
IP 192.168.2.1
LOAD MANUAL ; load code MANUAL or AUTO after reset
[REGS]
DMM1 0x00000000
FILE bdi2000/reg8272.def
-----------------------------------------------------------------------------
Any help would be greatly appreciated (and would also prove community support
is better than Abatron's commercial support ;-) ).
Best regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Flash programming using a BDI2000 on a MPC8248 CPU
2006-11-06 8:42 Flash programming using a BDI2000 on a MPC8248 CPU Laurent Pinchart
@ 2006-11-06 11:11 ` Adrian Cox
2006-11-06 12:16 ` Laurent Pinchart
0 siblings, 1 reply; 6+ messages in thread
From: Adrian Cox @ 2006-11-06 11:11 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: linuxppc-embedded
On Mon, 2006-11-06 at 09:42 +0100, Laurent Pinchart wrote:
> [INIT]
> WREG MSR 0x00000000
> WM32 0x00010004 0xffff2081 ; SYPCR
> WM32 0x00010024 0x00000000 ; BCR
> WM32 0x00010000 0x82240000 ; SIUMCR
> WM32 0x00010c80 0x00000001 ; SCCR
> WM32 0x000119c4 0x00000000 ; RCCR
> ; Initialize the flash memory controller
> WM32 0x00010100 0x40001001 ; BR0
> WM32 0x00010104 0xf8000834 ; OR0
It looks like your workspace is in RAM, but there's nothing in the setup
above to initialise the memory controller banks for your RAM. Check that
you can read and write the workspace locations with mm and md from the
BDI command line.
--
Adrian Cox <adrian@humboldt.co.uk>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Flash programming using a BDI2000 on a MPC8248 CPU
2006-11-06 11:11 ` Adrian Cox
@ 2006-11-06 12:16 ` Laurent Pinchart
2006-11-06 12:26 ` Adrian Cox
0 siblings, 1 reply; 6+ messages in thread
From: Laurent Pinchart @ 2006-11-06 12:16 UTC (permalink / raw)
To: Adrian Cox; +Cc: linuxppc-embedded
Hi Adrian,
> > [INIT]
> > WREG MSR 0x00000000
> > WM32 0x00010004 0xffff2081 ; SYPCR
> > WM32 0x00010024 0x00000000 ; BCR
> > WM32 0x00010000 0x82240000 ; SIUMCR
> > WM32 0x00010c80 0x00000001 ; SCCR
> > WM32 0x000119c4 0x00000000 ; RCCR
> > ; Initialize the flash memory controller
> > WM32 0x00010100 0x40001001 ; BR0
> > WM32 0x00010104 0xf8000834 ; OR0
>
> It looks like your workspace is in RAM, but there's nothing in the setup
> above to initialise the memory controller banks for your RAM. Check that
> you can read and write the workspace locations with mm and md from the
> BDI command line.
The workspace is in internal RAM, mapped at address 0x00000000 (the hardware
reset configuration register is 0x00000000). I tried setting IMMR to
0xf0000000 and mapping the SDRAM at 0x00000000, without success. The BDI2000
reports successfull flash programming, but the flash is definitely empty.
BDI>prog 0x40000000 u-boot-1.1.4-ucc32.16-0005 BIN
Programming u-boot-1.1.4-ucc32.16-0005 , please wait ....
Programming flash passed
BDI>md 0x40000000
40000000 : ffffffff ffffffff ffffffff ffffffff ................
40000010 : ffffffff ffffffff ffffffff ffffffff ................
40000020 : ffffffff ffffffff ffffffff ffffffff ................
40000030 : ffffffff ffffffff ffffffff ffffffff ................
40000040 : ffffffff ffffffff ffffffff ffffffff ................
40000050 : ffffffff ffffffff ffffffff ffffffff ................
40000060 : ffffffff ffffffff ffffffff ffffffff ................
40000070 : ffffffff ffffffff ffffffff ffffffff ................
40000080 : ffffffff ffffffff ffffffff ffffffff ................
40000090 : ffffffff ffffffff ffffffff ffffffff ................
400000a0 : ffffffff ffffffff ffffffff ffffffff ................
400000b0 : ffffffff ffffffff ffffffff ffffffff ................
400000c0 : ffffffff ffffffff ffffffff ffffffff ................
400000d0 : ffffffff ffffffff ffffffff ffffffff ................
400000e0 : ffffffff ffffffff ffffffff ffffffff ................
400000f0 : ffffffff ffffffff ffffffff ffffffff ................
I made sure I can write to the workspace at 0x00008000 using mm and md, using
both internal RAM (IMMR = 0x00000000) or SDRAM (IMMR = 0xf0000000).
Laurent Pinchart
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Flash programming using a BDI2000 on a MPC8248 CPU
2006-11-06 12:16 ` Laurent Pinchart
@ 2006-11-06 12:26 ` Adrian Cox
2006-11-06 12:38 ` Laurent Pinchart
2006-11-06 12:42 ` Abdul Rahaman
0 siblings, 2 replies; 6+ messages in thread
From: Adrian Cox @ 2006-11-06 12:26 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: linuxppc-embedded
On Mon, 2006-11-06 at 13:16 +0100, Laurent Pinchart wrote:
> The workspace is in internal RAM, mapped at address 0x00000000 (the hardware
> reset configuration register is 0x00000000). I tried setting IMMR to
> 0xf0000000 and mapping the SDRAM at 0x00000000, without success. The BDI2000
> reports successfull flash programming, but the flash is definitely empty.
I've also had problems with 8260 family flash programming caused by the
processor reading the Hard Reset Configuration Word from flash before
the BDI takes over. Does your board allow you to change RSTCONF to stop
the processor reading the HRCW?
--
Adrian Cox <adrian@humboldt.co.uk>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Flash programming using a BDI2000 on a MPC8248 CPU
2006-11-06 12:26 ` Adrian Cox
@ 2006-11-06 12:38 ` Laurent Pinchart
2006-11-06 12:42 ` Abdul Rahaman
1 sibling, 0 replies; 6+ messages in thread
From: Laurent Pinchart @ 2006-11-06 12:38 UTC (permalink / raw)
To: Adrian Cox; +Cc: linuxppc-embedded
> > The workspace is in internal RAM, mapped at address 0x00000000 (the
> > hardware reset configuration register is 0x00000000). I tried setting
> > IMMR to 0xf0000000 and mapping the SDRAM at 0x00000000, without success.
> > The BDI2000 reports successfull flash programming, but the flash is
> > definitely empty.
>
> I've also had problems with 8260 family flash programming caused by the
> processor reading the Hard Reset Configuration Word from flash before
> the BDI takes over. Does your board allow you to change RSTCONF to stop
> the processor reading the HRCW?
Yes it does. The HRCW is set to 0x00000000 by deasserting RSTCONF (logic
high). All tests were made with RSTCONF high (and thus HRCW equal to
0x00000000).
Laurent Pinchart
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Flash programming using a BDI2000 on a MPC8248 CPU
2006-11-06 12:26 ` Adrian Cox
2006-11-06 12:38 ` Laurent Pinchart
@ 2006-11-06 12:42 ` Abdul Rahaman
1 sibling, 0 replies; 6+ messages in thread
From: Abdul Rahaman @ 2006-11-06 12:42 UTC (permalink / raw)
To: Adrian Cox, Laurent Pinchart; +Cc: linuxppc-embedded
You should have RSTCONF pulled UP or LOW.
Use any jumper or something.Only then debugger can take control of target.
But usually once debugger takes control of processor HRCW is not read by
processor(8260).
-Rahaman
----- Original Message -----
From: "Adrian Cox" <adrian@humboldt.co.uk>
To: "Laurent Pinchart" <laurent.pinchart@tbox.biz>
Cc: <linuxppc-embedded@ozlabs.org>
Sent: Monday, November 06, 2006 5:56 PM
Subject: Re: Flash programming using a BDI2000 on a MPC8248 CPU
> On Mon, 2006-11-06 at 13:16 +0100, Laurent Pinchart wrote:
> > The workspace is in internal RAM, mapped at address 0x00000000 (the
hardware
> > reset configuration register is 0x00000000). I tried setting IMMR to
> > 0xf0000000 and mapping the SDRAM at 0x00000000, without success. The
BDI2000
> > reports successfull flash programming, but the flash is definitely
empty.
>
> I've also had problems with 8260 family flash programming caused by the
> processor reading the Hard Reset Configuration Word from flash before
> the BDI takes over. Does your board allow you to change RSTCONF to stop
> the processor reading the HRCW?
>
> --
> Adrian Cox <adrian@humboldt.co.uk>
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-11-06 12:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-06 8:42 Flash programming using a BDI2000 on a MPC8248 CPU Laurent Pinchart
2006-11-06 11:11 ` Adrian Cox
2006-11-06 12:16 ` Laurent Pinchart
2006-11-06 12:26 ` Adrian Cox
2006-11-06 12:38 ` Laurent Pinchart
2006-11-06 12:42 ` Abdul Rahaman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).