AT91RM9200 - Vector 6 for dataflash boot woes

Hello all,

I have built a board that contains (besides a lot of other stuff) a AT91RM9200 and an AT45DB642 dataflash chip. Now I'm trying to code a homebrew boot loader. For a number of reasons, cannot use U-boot. The boot loader works fine when loaded using a JTAG debugger (J-link), bu it won't work when I try to load it using the boot ROM code that's buil into the MCU. The MCU actually loads something from the SPI (I can see that using 'scope) that's a lot longer than just the 32 bytes that it wants t inspect in order to boot from flash. When I interrupt execution, I fin that it puts something in IRAM that looks like what I've put into th flash, but the IRAM image is corrupt:

- The first 0x0400 bytes are OK.

- The following 0x400 bytes contain garbage (mostly 0xff).

- At 0x0800, I find 0x0400 bytes of code that *should* be at 0x0400!

- At 0x1000, 0x0400 bytes of garbage (again) and so on. It looks like the MCU wants to load 2048-byte pages from flash (where thi beast only supports 1024-byte pages). I use the following code at vector 6:

0x10 | (0x0d
Reply to
Haroldp
Loading thread data ...

"Haroldp" skrev i meddelandet news:zcednbdjtL2xBn_bnZ2dnUVZ snipped-for-privacy@giganews.com...

You want to load dataflashboot.bin at address zero in the dataflash. This will handle vector 6, and will allow you to download your app to the rest of the dataflash

--
Best Regards,
Ulf Samuelsson
 Click to see the full signature
Reply to
Ulf Samuelsson

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.