I'm having a problem in eboot (CE6) reading nk.bin after reading another configuration file.
Is there something that needs to be reset or done to the mmc/sd interface to do additional reads?
Should I not use the BLSDDownload function? If not what should I use? What is the sequence?
This is my serial output:
1st file (cfg file):
BLSDDwnld: FN: fpga.xsvSDCardDet: 1MMCIssueIdentify: SD card detectedreported block size = 512Card size is = 1939456 512 byte sectorsmax clock freq = 25000000done. Directory Entry #2: <MLO > Directory Entry #4: <FTPD TMP> Directory Entry #7: <DATAIN~1 XML> Directory Entry #16: <EBOOTS~1 NAN>Next directory sector 481, file data area start 512 Directory Entry #17: <EBOOTSD NB0> Directory Entry #18: <NK BIN> Directory Entry #26: <FPGA XSV> Found file, starting cluster = 427, file size = 72418File Read/Cpy: 0x00007643
2nd file (os image):
BootDevice(4)BootDevLoc(4809c000)BLSDDwnld: FN: nk.binSDCardDet: 1MMC Stat: 00018000SDHC: command response timeout CTO!MMC::MMCCommandResponse: MMCSendCommand error, command = 55MMC::MMCCommandResponse: Command Response ErrorMMC Stat: 00018000SDHC: command response timeout CTO!MMC::MMCCommandResponse: MMCSendCommand error, command = 1MMC::MMCCommandResponse: Command Response ErrorMMCIssueIdentify: busy bit never deactivated -- probably no card, ocr = 0x0SDCardInit: No media found!failed
If anyone can shed some light on this, that would be great - I'm stumped.
problem is probably due to the SDHC/SD memory/FATFS subsystem in the bootloader
only being designed for one shot use (in the XLDR it loads EBOOTSD.NB0 and then
EBOOTSD loads NK.BIN). Changing EBOOT code to load other files from the SD
card is not a normal feature of the bootloader and needs extra work.
new work would be to create a function that would reinitialize the bootloader
SDHC/SD memory/FATFS to make it ready for accessing another
Actually you should be able to read many files from the SDCard in the bootloader, even though the FAT implementation in EBOOT is not complete. The trick is to call the function "FileIoInit()" only once, then call the function "FileIoOpen()" for each file you want to open. Calling "FileIoInit()" twice yields to the SDCard bootloader driver getting stuck.
Remember to keep the handle returned by "FileIoOpen()" if you want to access the same file later on because there is no way of closing an opened file.
Adeneo Embedded Support teamContact us at email@example.com
I'll have a try at that and see what happens.
Sounds like a good chance of working for what I need - as I only need two files, at the moment.
Thanks all for the suggestions
Sorry it's taken me a while to get back to this - other fires.
So I've done my best to try the 1x only FileIoInit:
This is what I get:
****************** FileIoInit 1x **************************
BLSDDwnld: FN: nk.bin
MMC Stat: 00018000
SDHC: command response timeout CTO!
MMC::MMCCommandResponse: MMCSendCommand error, command = 13
MMC::MMCCommandResponse: Command Response Error
MMC::MMCCommandResponse: MMCSendCommand error, command = 7
SDCardReadSector: Error reading file, retry (sector 543)
SDCardReadSector: Error reading file! (sector 543)
BOOTLOADER: read_sector 543 (DIR) failed
BLSDCardDownload: cannot open file
When I leave the FileIoInit in so it does it twice - I get different results:
****************** FileIoInit 2x **************************
MMC::MMCCommandResponse: MMCSendCommand error, command = 55
MMC::MMCCommandResponse: MMCSendCommand error, command = 1
MMCIssueIdentify: busy bit never deactivated -- probably no card, ocr = 0x0
SDCardInit: No media found!
Here's the previous read's output:
BLSDDwnld: FN: fpga.xsv
MMCIssueIdentify-: SD card detected
reported block size = 1024
Card size is = 3842048 512 byte sectors
max clock freq = 25000000
Directory Entry #2: <MLO >
Directory Entry #3: <EBOOTSD NB0>
Directory Entry #4: <FPGA XSV> Found file, starting cluster = 50, file size = 72418
So in either case it appears to leave the card in a state where it is unresponsive.
The 1x attempt - gets send_status & select/deselect cmd errors
The 2x attempt - gets app cmd errors
Not sure which is worse - but neither of them seem to work - so I'm suspecting some other cleanup needs to be done.
I just don't have any idea what that is. I'm at a loss here.
Hopefully someone out there has made this work and can help me out/point me in the right direction.
OK - you guys may color me daft.
I was going back through my code and I found that I left in some test code that did a reset of the SD controller.
Once I took this out - the 1x - FileIoInit method worked.
I give much praise and thanks to that suggestion as it worked as advertised.
Thank you all very much - your suggestions and feedback has been greatly appreciated.
Here's the result:
[1st file load]
[2nd file load -nk.bin]
Directory Entry #4: <FPGA XSV>
Directory Entry #5: <NK BIN> Found file, starting cluster = c3, file size = FF58A3
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.