Third Party > Repairing and Upgrading Rockbox Capable Players
Reflashing H120 via BDM (done, with pics)
ReK:
Ages ago I nuked my H120's flash (the red warning at the bottom of the IriverFlashing page... that's because of me). After looking at the BDM protocol it looked straightforward enough to try to fix it. I've gotten the important signals wired up (TDI, TDO, BKPT, DSCLK, PST0-3) and a basic implementation of parts of the BDM protocol, but I'm having a few issues.
First is getting the chip to halt. Pressing the power button with BKPT held low gets to PST=0xE mode, stopped but not halted. The H120 powers off a second or so after the button is released. Lowering and raising the reset pin doesn't seem to make it change. Is there anything specific to the H120 that needs to be done to make it work? The docs CF5249 docs mention the MTMOD pins, but they don't seem to be brought out to the board anywhere.
Secondly, I've yet to figure out what to write to the chip once I get the BDM working. Roughly, I need at least a few bytes of machine code to map the flash. Is it possible to use BDM write commands to rewrite the flash, or does that need to be done from code running on the chip? Also, is there a minimal bootloader or something I can write? I'm using an atmega88 with 8k of flash, and it would be nice to avoid setting a USB interface to write the full 44k bootloader.
ReK:
After a few days of messing around I did it. I've written up the process on the wiki (http://www.rockbox.org/twiki/bin/view/Main/H1x0Reflashing) but I thought I'd put some other info here.
For the first problem (the chip halting)... I think the problem was just that the BKPT wire had fallen off or something. It was probably more than that, and it had fallen off, but that eventually worked. The chip _is_ set to boot into BDM mode, rather than JTAG.
For the second problem (the code to run on the chip) I found a useful article with a basic makefile, link script and assembly code that was enough to get it working. Fixing these up and cribbing some code from the rockbox CRT and bootloader were enough to get it working. A lot of the code ended up being stuff cribbed from rockbox.
A few pictures:
The backlight turned on. No progress on the flash at this point, just gotten the BDM communication working (and working init code)
Wires attached to pin headers (the wires are too skinny to stick into a breadboard). The solder points are relatively large, so an 0.8mm tip was small enough to do it fairly easily. I somehow failed to notice the H120 was still turned on while I desoldered everything. Seemed to go ok anyway. One of these days I really should get it open again and clean up the leftover flux.
Normally this error message would be pretty annoying, but the HDD had to be removed because it covers up the debug points. Much better than it not turning on.
After all that, I've still got one torx screw left over. I _think_ it's from my other (lost, repainted) H120...
Multiplex:
Cool - I hope I never need this information though!
Chronon:
Thank you for putting this together and posting it to the wiki. 8)
kpapr1:
Hi, which AVR did you use? The schematic refers to the MEGA8 while the info says it's the MEGA88.
edit: OK, you have already mentioned that in the beginning of the post, it's the MEGA88. So, it's just wrong name on the schematic, I guess.
Navigation
[0] Message Index
[#] Next page
Go to full version