NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
f00b4r has quit [Ping timeout: 252 seconds]
f00b4r has joined #openocd
tsal has quit [Ping timeout: 258 seconds]
tsal has joined #openocd
rue_mohr has quit [Quit: Leaving]
thinkfat_ has joined #openocd
thinkfat has quit [Ping timeout: 268 seconds]
boru` has joined #openocd
boru has quit [Killed (NickServ (GHOST command used by boru`))]
boru` is now known as boru
rue_mohr has joined #openocd
braunr has quit [Remote host closed the connection]
Hawk777 has quit [Quit: Leaving.]
Hawk777 has joined #openocd
Haohmaru has joined #openocd
Hawk777 has quit [Quit: Leaving.]
braunr has joined #openocd
indy has quit [Quit: ZNC 1.8.2 - https://znc.in]
indy has joined #openocd
tarekb has joined #openocd
rudar has joined #openocd
urja has quit [Read error: Connection reset by peer]
urja has joined #openocd
rudar has quit [Quit: Leaving]
flo_h has joined #openocd
_whitelogger has joined #openocd
scuzz has joined #openocd
Haohmaru has quit []
akaWolf has quit [Ping timeout: 265 seconds]
tarekb has quit [Read error: Connection reset by peer]
akaWolf has joined #openocd
flo_h has quit [Remote host closed the connection]
ildar[m] has joined #openocd
joconor has quit [Quit: ZNC 1.8.2 - https://znc.in]
<jybz> Hello, I bricked my wifi router (aka uboot in the flash is not there anymore). I see that it is a MT7628 and it has openocd scripts there https://github.com/mtk-openwrt/openocd-scripts
<jybz> Do you think I can repair it with openocd and jtag devices (like jlink or usb-blaster) ?
<marex> jybz: doesnt the mediatek soc have some recovery mode ?
<marex> jybz: ask stefanro in #u-boot tomorrow around need (UTC)
<jybz> Hi marex, you are also here :D World look small. Thank you. When you say "around need UTC", it is like, noon ?
<marex> jybz: like noon in Europe
<marex> jybz: but yes, you can I think use openocd to bring the device back to life, or chipclip and program the SPI NOR with disposable board like RPi and flashrom
emeb has joined #openocd
<jybz> I don't have a rpi, I've to see how quick I can set it on a bananaPro (another SBC I have)
<jybz> Oh, I've the usbblaster (or a clone, I don't know), and it seems to be supported by flashrom https://flashrom.org/Supported_programmers
<marex> jybz: if you have anything which can bitbang 4 GPIOs, you are all set
<jybz> Sounds good, I've flashrom on my computer, the usbblaster_spi recognized by flashrom, I've a SOP16 clipchip, and I found the flash (on the back of the board).
<jybz> What remains : finding how to connect (which pin, on both side, as I never used the usbblaster), and finding how to flash which uboot. ^^
ipatch has quit [Quit: WeeChat 3.2]
zjason has quit [Read error: Connection reset by peer]
zjason has joined #openocd
<PaulFertser> jybz: flashing like this might have another gotcha. Since you need to power the flash you might also be powering the rest of the board that way, and if SoC is powered it might interfere with flash operations. Sometimes it's enough to pull target's RESET pin low.
<jybz> :(
<jybz> ok
<jybz> thank you
<PaulFertser> jybz: other times limiting power supply current helps (I guess some brown-out detector in SoC just starts keeping reset low internally if the voltage is below the threshold). Same about trying to feed it Vcc lower than nominal.
<PaulFertser> jybz: sometimes (if you're comfortable with that) lifting Vcc pin of the flash is the easiest way to get "ISP" flashing working.
<PaulFertser> jybz: and yes, the scripts for Mediatek (contributed by BREED the proprietary bootloader author) should allow you to recover, probably by uploading u-boot directly to SDRAM and running it and flashing from its command line.
<PaulFertser> jybz: if you have jlink I recommend jlink rather than old usb blaster.
<jybz> Hum... the jlink would power the chip ?
<PaulFertser> jybz: no, it's just that jlink is a better device, and it's also supported by flashrom and openocd.
<PaulFertser> jybz: do not you have a laboratory power supply?
<jybz> Unfortunately not...
<PaulFertser> jybz: you can check this forum thread to see how people were programming flash ISP: https://forum.openwrt.org/t/xiaomi-wifi-router-3g-v2/42584 . Basically they all used the current limiting method which I assume just resulted in lower Vcc.
<PaulFertser> At the moment I needed to access that flash I didn't have a clip so I just lifted the Vcc leg a bit and soldered 8 wires directly to all flash pins.
<PaulFertser> jybz: have you already found jtag pinout for your board?
<jybz> the needed power is between 1.65V and 1.95V ? I can't deliver it... Only 1.5, or 3V with batteries, and 3.3 with one regulator
nohit has quit []
nohit has joined #openocd
<jybz> PaulFertser: no, I didn't find a jtag pinout on the board, I already had to solder the pin for the uart (before erasing uboot :D)
<jybz> PaulFertser: the jlink have even more pin /o\
<PaulFertser> jybz: have you measured it? Is that really 1.8 V?
<jybz> No, I didn't measure it, I looked on a similar datasheet
<jybz> flashrom -L don't list the j-link
<jybz> jlink is not listed there https://flashrom.org/Supported_programmers
<jybz> > * libjaylink (if you want support for SEGGER J-Link and compatible devices)
<jybz> I think my version of flashrom is without support of jlink
<PaulFertser> jybz: you should really measure it on a board when you power it normally
<PaulFertser> jybz: recompiling flashrom is ~trivial.
<jybz> I can power the board and keep pressing on the reset button.
<jybz> I don't have good measurement tool... That really something I'm missing.
<PaulFertser> jybz: the reset button is likely a normal GPIO, nothing to do with SoC reset really.
<PaulFertser> jybz: not even any voltmeter?
<jybz> I've one shitty voltmeter, I can try what it gives me.
<jybz> 3V6
<jybz> Should I belive my bad voldmeter ?
<jybz> lol when I press the voltmeter between two fingers, it measures 7volts...
<jybz> BTW, the routeur is a TP-link
<PaulFertser> jybz: 3.6 is pretty close to 3.3 V which I'd expect.
<jybz> ok, so, what is the best plan ? (one hour and half ago, I though one hour will be large enough :D )
<jybz> I can't solder a wire for reseting the controller
<jybz> because it is GBA
<jybz> The reset button could be a GPIO
<PaulFertser> jybz: you can try one of the tricks like powering the flash from a weak 3.3 V supply like in that forum thread.
<jybz> Would 2x 1.5v batteries be enough ?
<jybz> Otherwise, I've a 3.3 regulator and a breadboard.
<jybz> So, unsolder and lift up VCC, solder a wire on it and a second on the board ground, power it at 3,3v, compiling libjaylink, compiling flashrom, finding the pinout between the jlink and the SOIC8 chipclip. Did I miss something ?
<PaulFertser> jybz: if you lift up Vcc then you just use your clip, no need to solder wires.
<jybz> ahhh the clip can power the flash, but should not power the board (i.e the controller) ?
<PaulFertser> jybz: TDI is MOSI, TDO is MISO, TCK is SCK.
<PaulFertser> jybz: yes, the idea is either to not power the board at all or to power both flash chip and the board with a lower voltage so that the controller wouldn't be able to start trying to boot.
<jybz> You agree, /CS to GND, /WP to VCC and /RST to VCC ?
nohit has quit [*.net *.split]
emeb has quit [*.net *.split]
ChanServ has quit [*.net *.split]
crabbedhaloablut has quit [*.net *.split]
akaWolf has quit [*.net *.split]
c4017w has quit [*.net *.split]
captain_morgan has quit [*.net *.split]
zjason has quit [*.net *.split]
sud has quit [*.net *.split]
ildar[m] has quit [*.net *.split]
boru has quit [*.net *.split]
indy has quit [*.net *.split]
Getty has quit [*.net *.split]
urja has quit [*.net *.split]
Steffanx has quit [*.net *.split]
cyrozap has quit [*.net *.split]
tomtastic has quit [*.net *.split]
scuzz has quit [*.net *.split]
borneoa_ has quit [*.net *.split]
gruetzkopf has quit [*.net *.split]
xantoz has quit [*.net *.split]
bacam has quit [*.net *.split]
rkta has quit [*.net *.split]
devanagram has quit [*.net *.split]
marex has quit [*.net *.split]
lh has quit [*.net *.split]
rue_shop2 has quit [*.net *.split]
cp- has quit [*.net *.split]
tlwoerner has quit [*.net *.split]
clever has quit [*.net *.split]
Fleck has quit [*.net *.split]
Slide-O-Mix has quit [*.net *.split]
nikomo has quit [*.net *.split]
zapb has quit [*.net *.split]
antto has quit [*.net *.split]
flatmush has quit [*.net *.split]
nadrian has quit [*.net *.split]
pi0 has quit [*.net *.split]
klysm has quit [*.net *.split]
_franck_ has quit [*.net *.split]
jybz has quit [*.net *.split]
zmatt has quit [*.net *.split]
tchebb has quit [*.net *.split]
medicalwei has quit [*.net *.split]
olerem has quit [*.net *.split]
mithro has quit [*.net *.split]
key2 has quit [*.net *.split]
NishanthMenon has quit [*.net *.split]
karlp has quit [*.net *.split]
akaWolf has joined #openocd
nadrian has joined #openocd
tomtastic has joined #openocd
scuzz has joined #openocd
captain_morgan has joined #openocd
crabbedhaloablut has joined #openocd
sud has joined #openocd
c4017w has joined #openocd
cyrozap has joined #openocd
rkta has joined #openocd
flatmush has joined #openocd
bacam has joined #openocd
xantoz has joined #openocd
mithro has joined #openocd
gruetzkopf has joined #openocd
zmatt has joined #openocd
karlp has joined #openocd
pi0 has joined #openocd
olerem has joined #openocd
key2 has joined #openocd
ChanServ has joined #openocd
NishanthMenon has joined #openocd
tchebb has joined #openocd
borneoa_ has joined #openocd
medicalwei has joined #openocd
klysm has joined #openocd
zjason has joined #openocd
jybz has joined #openocd
_franck_ has joined #openocd
rue_shop2 has joined #openocd
cp- has joined #openocd
tlwoerner has joined #openocd
clever has joined #openocd
Fleck has joined #openocd
ildar[m] has joined #openocd
indy has joined #openocd
boru has joined #openocd
Steffanx has joined #openocd
Getty has joined #openocd
urja has joined #openocd
lh has joined #openocd
antto has joined #openocd
Slide-O-Mix has joined #openocd
nikomo has joined #openocd
zapb has joined #openocd
devanagram has joined #openocd
marex has joined #openocd
nohit has joined #openocd
emeb has joined #openocd
ildar[m] has quit [Ping timeout: 246 seconds]
lh has quit [Ping timeout: 272 seconds]
ChanServ has quit [*.net *.split]
<PaulFertser> jybz: no, you feed target Vcc to jlink pin 1.
ChanServ has joined #openocd
<PaulFertser> jybz: not sure, probably /CS should go to TMS.
<jybz> Ah VTref, yes it make sense
rkta_ has joined #openocd
rkta has quit [Ping timeout: 244 seconds]
rkta_ is now known as rkta
<jybz> On the jlink and the usbblaster, how to set vtref ?
<jybz> I'm too tired, good night all !
<jybz> Thank you a lot PaulFertser
<PaulFertser> jybz: good luck, hope you manage it tomorrow!
<PaulFertser> jybz: you just connect Vtref to target's Vcc.
<jybz> Oh ? Wait, I should power the device, disconnect VCC but connect VTref to the powered board ?