Rockbox Development > New Ports
SanDisk Sansa m200 series (v1)
rickbronson:
I thought it would be a good idea to be able to read registers on running Sansa firmware so I wrote a c program that overlays code in the SANSM200.rom image then calculates the CRC and makes a new SANSM200.rom. This file is then put on a m230 in the root directory, when the USB cable is pulled it does a firmware update (but only if the battery is very fresh!). I found the tiny subroutine that runs when the "Information" menu is brought up. The program that I overlayed prints one different register each time you go out of, then into "Information". Here are some interesting register values:
.word 0x80000300 // GDATA_A got: 00005fef
.word 0x80000304 // GIOCON_A got: 00000070
.word 0x80000308 // GSEL_A got: 00000080
.word 0x80000310 // GDATA_B got: 003a0f5c
.word 0x80000314 // GIOCON_B got: 002cfca3
.word 0x80000318 // GSEL_B got: 000012a3
.word 0x80000320 // GDATA_C got: 02000000
.word 0x80000324 // GIOCON_C got: 03ffffff
.word 0x80000328 // GSEL_C got: 00000001
.word 0x80000330 // GDATA_D got: 000000d0
.word 0x80000334 // GIOCON_D got: 00000030
.word 0x80000338 // GSEL_D got: 00000002
.word 0x80000340 // GDATA_E got: 00000000
.word 0x80000344 // GIOCON_E got: 000000ff
.word 0x80000348 // GSEL_E got: 00000000
.word 0x90000050 // NFC_CTRL got: 00f00131
.word 0x9000012C // SDIDCTRL got: 00001494
.word 0x90000130 // SDISTAT got: 01604080
Anyone have any other register (or anywhere in the whole memory space) they are interested in?
shotofadds:
I wrote some code that attempts to read the NAND chip id, which I've put on the tracker as FS#9096. On my rev.3 m230 this displays NAND id 0x0 0x0... as if no chip were present, but on the rev.1 or C100 it seems to cause a freeze instead. Anyone want to take a look?
I don't think I've mentioned it here or the wiki yet, but there are a set of pins which control the boot mode. They're just to the right of the LCD and are marked "NAND", "BANK1", "BANK2", "TRI-F" and "USB". Of these only "TRI-F" is connected on my rev.3.
If the "USB" pins are connected when inserting the USB cable, the device will boot into USB-boot mode, which is nice. :)
rickbronson:
shotofadds,
This is what I got when I tried to get nand id's, all zeros. Yesterday I tried setting all of the GPIO and NAND registers to what they are in the running product but still didn't get anything.
On a different subject, one thing I found that made me curious is this register:
.word 0x80000364 // BM got: 00000013
This tells me that the tcc770 is booting off of EEPROM. Anyone know anything about this? If this is true then the tcc770 may be going right from EEPROM to SD in the boot process and the NAND may not be tied directly to the tcc770. I looked at the board and did see a 10 pin part marked "SCTI AIP" that could be a EEPROM
Rick
atomikpunk:
Hi guys,
sorry to spam your thread but I'm currently working on the sansa v2 port and I bought an m230 off ebay. Unfortunately it is one with the v.2.2.5 firmware, so it is a "v1 hardware". I'm interested in trading this one for a "hardware v2" one, that is one with a v.4.x.y firmware. I really don't care the flash size and I understand that mine is only 512Mb, but for rockbox development, it doesn't matter.
So if anyone reading that thread is willing to trade, please contact me via personal message...
Thanks and good luck with the v1 port (which seems to go smoothly as I can see)!
shotofadds:
A quick update on current progress, for NAND M200s at least:
The TCC780x (D2) NAND driver has had a few tweaks applied and now also runs on TCC77x, as ata-nand-telechips.c. With current SVN it's possible to call ata_init() from the bootloader and read sectors with some degree of success. If you're lucky (and you've enabled HAVE_FAT16SUPPORT) it may even successfully mount the partition.
The logical/physical block translation scheme appears to be almost identical to the D2, but the current implementation is not perfect, so incorrect data is sometimes/often returned. From what I've seen so far, these kind of errors seem to occur more frequently on the m200 than the d2.
To try and investigate further, I've written a quick-n-dirty Windows program to write raw sectors with known values to the M200 UMS volume, and some Rockbox code to read/verify those using the NAND driver. The first test successfully read the first 16Mb with no apparent errors. I'll try to do some further tests to track down the remaining problem(s) in the next week or two, but no promises...
--- Quote from: rickbronson on June 27, 2008, 12:32:52 PM --- This tells me that the tcc770 is booting off of EEPROM. Anyone know anything about this? If this is true then the tcc770 may be going right from EEPROM to SD in the boot process and the NAND may not be tied directly to the tcc770. I looked at the board and did see a 10 pin part marked "SCTI AIP" that could be a EEPROM
--- End quote ---
Sorry, I hadn't seen your post until now. That certainly goes a long way to explaining how those HARP versions might boot. I'm not really that familiar with the various boot modes available - does the datasheet give any clues as to how you might read data from that chip?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version