Replies: 21 comments 46 replies
-
|
It's really hard to debug hardware without it in front of me, my first thought is one of the pins is connected to the wrong GPIO, or there is a loose connection that is connecting when you push a probe on it.
This suggests suggests no data is being read. Which could mean a pin is grounded or disconnected. You've probably read all the discussions, but double check this comment about pin numbering on the RPi.
This doesn't look right, I think it should be 1500 kHz. What do you have in You can run openocd -d |
Beta Was this translation helpful? Give feedback.
-
|
I found that GND is not properly connected to board ground, could be this. The am1802.cfg is straight from the hacktribe repo, but I had edited it temporarily for 10khz to be sure. It is definitely not the wrong GPIO pins and I am very aware of logical vs physical pin numbering. Maybe you remember this or have it noted down: TDO should read 0v against board ground because it is logic low? And does TRS pin read 2.2V steadily? Once the JLink clones come in the mail I will try with those as well. |
Beta Was this translation helpful? Give feedback.
-
Definitely need a good ground connection. The ground plane will drain heat from the iron quickly, I had to increase the temperature quite a lot to get a good solder joint.
I'm not sure, but it makes sense.
I can't test this, but the RPi GPIO tolerate 3.3 V. I think we need TRST connected to initialise the CPU JTAG controller, it probably won't work without it. Can you post the debug log from |
Beta Was this translation helpful? Give feedback.
-
I think this is normal, but I can't open up an electribe to check right now.
What happens when you boot without the RPi connected? Is it any different to before you soldered the header? Did you test with the TRS line connected this time?
I'm not sure I can offer you anything more helpful than the logs, If you post some photos of your setup I'll try to look for issues, but I doubt I can find anything from a photo you can't see with a meter. |
Beta Was this translation helpful? Give feedback.
-
|
Electribe 2 works completely fine. I tested with TRS line yes. I'll wait for some Chinese J-Link clones in the mail and see if those work, who knows! |
Beta Was this translation helpful? Give feedback.
-
|
Infinite, I will reflow the joint since maybe the resistance should read a steady 1.5k just like other pins. I suspect, maybe my multimeter touched the solder, but not the header, and hence beeped deceptively |
Beta Was this translation helpful? Give feedback.
-
|
Some of these pads are inline with the header pins, you'll have to trace to work out which ones. If you check continuity between those pads and the RPi, you know the full connection is good.
|
Beta Was this translation helpful? Give feedback.
-
|
Great tip! I compared to the BF523 holes and TDO corresponds to the 6th pad there. In my AM1802 header it doesn't, even after melting it properly again. I'm pretty certain I found the problem: I remember burning/oxidising the copper TDO pad a bit in last attempt to solder the header, it had black-ish marks, but not severe . Unfortunately I don't have a photo of this : ( Maybe I can tape off all irrelevant pads and dirtily install a jumper wire between the TDO pin and that pad instead? |
Beta Was this translation helpful? Give feedback.
-
|
Judging by this photo, CPU TDO is the third pad from the end closest to the CPU.
|
Beta Was this translation helpful? Give feedback.
-
|
Alright gonna try that thanks ! |
Beta Was this translation helpful? Give feedback.
-
|
Well, did I fry my board? 🥴 No continuity whatsoever between TDO and those pads |
Beta Was this translation helpful? Give feedback.
-
|
Alright thanks anyway. Learnt a lot from this ordeal and it was fun and educationally valuable. I'm confident that I can solder my other electribe with no problems, and in the meantime i can learn the things you suggested :) |
Beta Was this translation helpful? Give feedback.
-
|
After bricking 2 electribes I managed to do it nicely, and cleanly now. I can dump memory and control the CPU using JLink Commander so that's good. But I do wonder about this: This time, on a new electribe, again TRST is a steady 2.2V against ground. If not for that, I would be able to load binaries into CPU using JLinkExe |
Beta Was this translation helpful? Give feedback.
-
|
Alright |
Beta Was this translation helpful? Give feedback.
-
|
Possible workaround if you can still get it to connect the way you did in this comment. In // Disable and clear interrupts in AINTC.
IntAINTCInit();
// Disable cache and MMU.
CP15ICacheFlush();
CP15DCacheFlush();
CP15ICacheDisable();
CP15DCacheDisable();
CP15MMUDisable();
// Set interrupt vector to ARM RAM.
CP15HighVectorEnable();It's jank, but it's what I'm doing in the Hacktribe sysex loader. You should also clear the On Chip RAM to zeroes in the GDB init script, before loading the binary. EDIT: In the Hacktribe sysex loader I also have this in @ Reset hardware.
bl dev_board_terminate
@ Disable interrupts.
mrs r0,CPSR
orr r0,#0xc0
msr CPSR,r0The |
Beta Was this translation helpful? Give feedback.
-
|
I think at this point you need a scope, or at least a logic analyser, to check what is actually happening between the board and debugger. The workaround I suggested will never be a good solution and I would concentrate on working out why JLinkGDBServer doesn't wait. I reckon it probably is waiting, but is receiving something it thinks is a response and trying to process invalid data. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Alright the VTRef from the E2 works 👍🏻 But JLinkGDBServer ends up polling for connection so still SBL runs 🙄 |
Beta Was this translation helpful? Give feedback.
-
I think the debug adapter releases TRST (high) after power on reset, then it enters emulation boot mode instead of whatever is set by the boot mode pins. Then instead of executing the AIS from flash, the ROM Bootloader (RBL) just waits in a loop for the debugger to load some code. See section 6.4.1 of the datasheet.
Can't write the ROM, it's read-only. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Hi bang, have you still got a backup somewhere where you correctly initialize SPI for the Flash read/write functionality? Since I just want to get on with development, my idea is to write a Was this when Flash still worked? |
Beta Was this translation helpful? Give feedback.










Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
So I soldered a toggle switch so power can be always held, and a JTAG header, connected it to RPi 4B. Checked all pins and no bridges, proper 3.3V against board ground except on TRST pin which is steady 2.2V, not sure if that's correct but I disconnected it from RPi GPIO anyway.
Yet, if I boot my E2, no matter what I do I get this output:
I am certain the electrical connections are double checked, even tested Pi GPIO and it's toggleable. Still 0x00.
openocd.cfg:
What am I doing wrong here?
Beta Was this translation helpful? Give feedback.
All reactions