NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
Hawk777 has joined #openocd
nerozero has joined #openocd
Haohmaru has joined #openocd
Hawk777 has quit [Quit: Leaving.]
d_olex has joined #openocd
h_ro has joined #openocd
d_olex has quit [Ping timeout: 276 seconds]
d_olex has joined #openocd
slobodan has joined #openocd
<Haohmaru> i went thru a pile of devices which had all kinds of problems, but one of them is left which i couldn't fix, it doesn't wanna get programmed
<Haohmaru> "Error: Error connecting DP: cannot read IDR"
<Haohmaru> there were a bunch of others like this but they had simple issues like shorts around the SWD signals, etc..
<Haohmaru> this one doesn't have shorts, everything appears to be the right value, pull resistors, etc... 3.3V reaching the chip, but still nothing
d_olex has quit [Ping timeout: 272 seconds]
<Haohmaru> what else could cause this? afaiu this basically means that the MCU doesn't talk to the debugger
<Haohmaru> ehm, this is a Cortex-M4F
<Haohmaru> the pessimistic guess would be "dead chip"
<zapb_> Haohmaru, if you want support you should describe your setup and what are you trying to achieve... "I have a Cortex-M4F" is like "I have a microcontroller" - not sufficient to give you support ;)
<Haohmaru> it's not a bare microcontroller of course, it's part of a device
<Haohmaru> i have a pile of these, went thru them, got them working, except for this one
<Haohmaru> it's a SAME53N19A
<Haohmaru> the devices are actually a mix of SAMD51N19A and a few other variations under the same datasheet
<Haohmaru> the setup is... i power them up, then i plug a debugger (a daplink), and then i put my bootloader, target is powered, the daplink doesn't give power, both work on 3.3V
<Haohmaru> SWD port is done like Atmel says, with 1k pull up on SWCLK, and on the RESET there's a 10k pull up and a 47n capacitor to ground
<Haohmaru> hm, i don't actually know if the capacitor is really 47n, i could remove it to see if that makes it talk to the debugger
<Haohmaru> nope
<Haohmaru> okay, it seems the RESET signal stays at 3.3V and the debugger can't drive it low, yet i'm pretty sure i checked resistance to 3.3V so it's not a simple short
<Haohmaru> thus, i guess, dead reset pin
<zapb_> Hammdist, what debug adapter do you use?
<Haohmaru> he or moi?
<zapb_> Haohmaru, you, sorry :D
<zapb_> Most of the time MCUs are quite robust wrt external caps (in my experience)
<Haohmaru> daplink, kamamai.pl zl33prg
<Haohmaru> what do you mean?
<zapb_> Haohmaru, you mentioned that you're not sure about the 47n cap
<zapb_> Haohmaru, is your wiring solid? short cabels? proper GND connection? stable power supply?
<Haohmaru> yes, so i removed it
<Haohmaru> the SWD cable is maybe 40cm long, made of ethernet-grade cable of multri-strand copper conductor
<Haohmaru> i've programmed and debugged literally hundreds of boards with it
<Haohmaru> the power (3.3V) comes locally from the device's own regulator, which is a 12V->3.3V step-down regulator
<Haohmaru> well, there's another possibility that i didn't check, that is, whether the RESET happens to be broken along the path from the board to the debugger (that'll mean probably in the actual debug connector on the device)
<zapb_> Haohmaru, the reset should not influence the connection to the DAP
<zapb_> So even if you reset is not properly connected you should see a working connection at least to the DAP
<Haohmaru> not sure about that, $vendor says the RESET _must_ be wired to the debug port
<Haohmaru> thus i do it
<Haohmaru> i checked the SWCLK signal on the scope, it looked the debugger was clocking stuff normally there, the RESET was sitting at 3.3V and wasn't falling, i didn't check SWDIO, that signal goes directly from the debug connector to the MCU pin and there's no components involved
<zapb_> Well if that would be true, how would you connect under reset to a target? ;) Anyway, connect it to 3v3 and you're done.
<Haohmaru> but the SWDIO pin is not shorted to a neighbour pin, nor to GND/VDD, it's soldered, there is electrical connection from it to the debug port
<Haohmaru> connect what to 3.3V?
<Haohmaru> the thing i'm doing is running my silly "flash.sh" script which runs openocd with a "program" command and my bootloader.elf, i'd think the debugger would have to hold the chip in RESET for this operation, but i'm not sure
<zapb_> Haohmaru, keep your setup simple, try to just connect to the target with OpenOCD. Check again all VDD and GND connections if your target is hand soldered ;D
<Haohmaru> the debug port's connector is innocent too, there's electrical connection from the other end of the 40cm cable all the way to the pins on the MCU
<Haohmaru> for all of the important signals (RESET, SWCLK, SWDIO, VDD, GND)
<Haohmaru> the chip has been baked, perhaps the stencil might have been non-ideal and it has been touched by soldering iron afterwards, doesn't matter because after that i've put flux and went thru the whole chip with the iron, then i've cleaned it, and the soldering is good
<Haohmaru> it's well positioned, and the solder joints look fine, i don't see anything fishy or hairy, and i measured for shorts already several times
<Haohmaru> so, it smells like maybe "dead MCU"
Haohmaru has quit [Quit: saionara]
pengi3 has quit [Ping timeout: 252 seconds]
pengi3 has joined #openocd
Hawk777 has joined #openocd
nerozero has quit [Ping timeout: 245 seconds]
pedroa has joined #openocd
<pedroa> Paul , you there ?
<pedroa> wrong channel
pedroa has quit [Quit: Client closed]
slobodan has quit [Ping timeout: 260 seconds]
ali1234 has quit [Remote host closed the connection]
ali1234 has joined #openocd