?? readme.txt
字號:
PURPOSEThis code illustrates how to write a SPI bootloader (spi_prepend.bin) which can load a secondary image (hello_world.bin) to SDRAM.The secondary image can have any size. It is only limited by the size of the SPI flash and the SDRAM available.PREREQUESITESThe SPI flash memory chip's /CS line must connected to EP93XX's SPI_FRAME signaldirectly to allow the boot ROM inside EP93XX to access the SPI serial flash.The SDRAM must be connected to /SDCS0 (0xc0000000 physical address).The SDRAm can be 16 or 32 bit wide.BUILDING AND TESTINGType 'make' in this directory. You'll build a file called 'spi_image.bin'.This image can be programmed into SPI flash like this:download -s 2 spi_image.binAfter succesfully programming the image to SPI the board will boot the exampleprogram from SPI flash.It'll output 'hello_world' and dump the first eight 32bit words at the load address in SDRAM.IMPORTANT VARIABLES OR CONSTANTSspi_boot_example/spi_bootloader/main/main.c/COUNT_OF_BYTES_TO_COPY :defines how many bytes are to be copied from SPI memory to SDRAM.spi_boot_example/include/regs.h/SDRAM_LOCATION :defines the load address in SDRAM for the code to be copied from SPI flash to SDRAM.FAQProblem:My EDB93xxA board doesn't boot from SPI at all.Answer:The SPI flash's /CS line is connected to the EP93XX's SPI_FRAME via an OR gate.One of the OR gate's inputs is connected to a GPIO and pulled up via a resistor.This input needs to be pulled low with a 1k resistor.Problem:My EDB93xxA board insists to boot from nor flash and doesn't even touch SPI flash.I made the HW modification which pulls the OR gate's GPIO connection low via a 1k resistor.Answer:Code in nor flash must be marked invalid by overwriting the CRUS marker at the beginning of a valid nor flash image.This can be done by writing some random data to nor flash.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -