wavesoft/CCLib

CC2531: Resistors issue

ReDetection opened this issue · 8 comments

My issue looks pretty much as #24, however I have different target device.

My setup: CC2531 on the usb dongle, Arduino nano (tried different set of pins, I also checked they are good at both INPUT and OUTPUT).

I always get ERROR: The chip is not responding. Check your connection and/or wiring! message when target chip connected (when it's not – then I get message that chip is not found).

I also have logic analyser, so that is the image. You can see decoded exchange with computer in the bottom right. Probes are on the CC2531 side except channel 03 "data out".
screenshot 2019-01-13 at 15 55 30

Looks like CC2531 holding all the lines tied up so my arduino cannot put them down. Maybe internal pullups of CC2531 have less resistance?

OK, if I change resistors to 15k instead, then now it always give me random chip id – my guess that now cc2531 cannot change internal capacity of the pin quick enough. Hmm..
screenshot 2019-01-13 at 17 49 49

using 50k and 100k resistors it worked 🎉 probably internal pullup resistors are different chip to chip. now I'm able to read the flash

and I also write succeed. cheers!

what is recommended way to make this knowledge shared? should I PR with just a note in readme or should I replace schematics, etc?

Hello @ReDetection !
I guess you are referring to the voltage divider resistors?

Please create a PR with the resistor values changed on the README.md, and if you can, also re-create the fritzing diagram with the new resistor symbols. If you cannot do it, I can do it later.

yes, I mean them.

ok I can do that.

Actually I had 50k/100k only for DD. DC and reset I drove with 15k/30k resistors to be extra sure target device won't influence them. should I keep it 15/30 or stick to 50/100 in the readme, fritzing and arduino header?

btw, I was able to communicate with CC2531 and CC2541 target chips, I think I can also note they are working in the readme.

Now that I think of it, let's create a troubleshooting section, right before the Compatibility Table section, and let's write your suggestion there. Something around the lines of:

Troubleshooting

You wired everything up, you double-checked that your pin assignments are correct and you are still not able to flash your device? Then try the following:

  • Try using 50/100 resistors instead of 100/200 ...
  • ...

This way we can add future corner cases there

wsowa commented

Where does the "official" 100k/200k resistors values come from actually? I ask because they barely have a chance to work and no surprise they cause issues.

I've hooked up a scope into DD and DC lines and with 100k/200k resistors the signals look very distorted (rounded edges, signal barely manages to raise before falling). It seems like capacitance of pins, PCB and wireing has enough significance to cause problems. With 10k/20k resistors the edges are sharp and nice and I have no issues. The resistance is high enough to keep the current well below 1mA so no risk of damaging the chip or Arduino.

I suggest to modify the wiring documentation and change the resistances to 10k/20k so people don't get into the same problems.

tido- commented

if you have a Raspberry Pi (I am not a fan) you can just connect it and flash it. I wasted hours on the Arduino /ESP32 ideas. This just worked: https://github.com/jmichault/flash_cc2531