TI E2E Community
Digital Signal Processors (DSP)
OMAP-L13x, AM1x and C674x Processors Forum
Loading code to SPI Flash using OMAPL138
I'm trying to follow the instructions of the following wiki to program the SPI Flash connected to an OMAPL138 processor on a custom board. It freezes at at: "Waiting for SFT on the OMAP-L138..."
We have the SPI Flash connected to SPI1 of the OMAPL138. The SPI flash we are using is the N25Q128A21.
Following is the output from the sfh utility (Perhaps it is also worth noting that I get something similar when I just try and erase the flash with the command: sfh_OMAP-L138.exe -erase -p COM5 -v):
D:\work\tmp\OMAP-L138_FlashAndBootUtils_2_40\OMAP-L138\GNU>sfh_OMAP-L138.exe -flash_noubl -p COM5 -v d:\work\tmp\ais.out----------------------------------------------------- TI Serial Flasher Host Program for OMAP-L138 (C) 2012, Texas Instruments, Inc. Ver. 1.67-----------------------------------------------------
[TYPE] Single boot image[BOOT IMAGE] d:\work\tmp\ais.out [TARGET] OMAPL138 [DEVICE] SPI_MEM [SPI Block] 0
Attempting to connect to device COM5...Press any key to end this program at any time.
(AIS Parse): Read magic word 0x41504954.(AIS Parse): Waiting for BOOTME... (power on or reset target now)(AIS Parse): BOOTME received!(AIS Parse): Performing Start-Word Sync...(AIS Parse): Performing Ping Opcode Sync...(AIS Parse): Processing command 0: 0x58535901.(AIS Parse): Performing Opcode Sync...(AIS Parse): Loading section...(AIS Parse): Loaded 9200-Byte section to address 0x80000000.(AIS Parse): Processing command 1: 0x58535901.(AIS Parse): Performing Opcode Sync...(AIS Parse): Loading section...(AIS Parse): Loaded 736-Byte section to address 0x800023F0.(AIS Parse): Processing command 2: 0x58535906.(AIS Parse): Performing Opcode Sync...(AIS Parse): Performing jump and close...(AIS Parse): AIS complete. Jump to address 0x80000000.(AIS Parse): Waiting for DONE...(AIS Parse): Boot completed successfully.
Waiting for SFT on the OMAP-L138...
I'm continuing to work this and thought I'd post a bit of an update.
1) I was able to boot load my program through the UART using the slh_OMAP-L138.exe program. So UART stuff seems to be working just fine and AISgen must be working correctly.
2) I can't even issue a sfh_OMAP-L138.exe -erase command. Something isn't working correctly when talking to the SPI flash.
I have been looking around for the code that is running on the OMAPL138 to try and understand what's happening, but I haven't found that code. Can anyone point me towards that code? Is that was "u-boot" is?
Looking at the flash memory we have on the board (N25Q128A21) (here's the datasheet by the way), it says:
To program one data byte, two instructions are required: write enable (WREN), which is one byte, and a page program (PP) sequence, which consists of four bytes plus data.
I saw a comment in the Wiki somewhere that I seem to remember saying that by default the SPI writer doesn't perform a write enable. That's why I'd like to see to the source of the SPI writer so I can figure out exactly what it's trying to do.
Our custom board does not have any external RAM. I think the tools might require external RAM to hold the image before it is transferred to the SPI flash.
see http://processors.wiki.ti.com/index.php/Serial_Boot_and_Flash_Loading_Utility_for_OMAP-L138. This wiki page describes where you can get the source code of the flash loader utility and how to build it.
MikeSuttonOur custom board does not have any external RAM. I think the tools might require external RAM to hold the image before it is transferred to the SPI flash.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.