Upload Error on a Moteino USB R4 and loosing Digital Pins control

Started by luisr320, January 23, 2019, 07:38:59 PM

luisr320

Well so far so good. I remember now that my car didn't had the PING subroutine and always worked. I uploaded a new sketch with the millis() function and it's acting up now. And that int millis() is also common to all the nodes that are acting up. So probably that is the root cause.

It's funny that I have spent almost a month chasing this bug and all it took was to come over and try to write down what the problem was in a way that other people could understand it to make me realize what it was. I don't like to ask for help for problem solving (problem solving is always fun) but sometimes you got to do it.

Let's hope this was the solution. Anyway, thank's for your help.

Regarding the first problem I reported, the 0X007b error is not really a problem I should be worried about, right?

Felix

Quote from: luisr320 on January 26, 2019, 08:32:54 AM
Let's hope this was the solution. Anyway, thank's for your help.

Regarding the first problem I reported, the 0X007b error is not really a problem I should be worried about, right?
Good, please confirm once you know that was it!
Regarding upload - not sure what to say. If the AVR's flash content in memory is identical to what you upload, then no issues. This can be easily verified with a programmer that verifies the AVR flash against a binary/HEX file, or you can just read the content as HEX and compare yourself.

The permanent solution would be to cut the D+/- traces and insert 27 ohm resistors. It you can verify this doesn't affect upload, then don't worry about it.

luisr320

So far so good. Looks like the problem was indeed the variables types. I'm pretty sure it was the millis(). Anyway, i'll let it cook for a couple of days more before I assume that it is definitivly  solved.

Félix, what size do you recomend for the resistor packages? 0805?

luisr320

Nevermind. 0603 should be more adequated. It's those R3 and R5. Right?

Felix

Quote from: luisr320 on January 27, 2019, 11:56:59 AM
Nevermind. 0603 should be more adequated. It's those R3 and R5. Right?
Correct, 0603 is what I used.
You will need good magnification and a steady hand, cut traces in a staggered way (ie not next to each other to allow to fit resistors - probably on bottom is easier) and remove soldermask, tin them, use flux to make it easy, and solder resistors, then you might want to cover them with some hotglue to protect them from being ripped off when you handle the boards.