How to Reset the Dev Kit

#22

NP @bateske , I’ll perform the test, if you tell me what and where :smile:

0 Likes

#23

@bateske now my other DEV kit I received from @acedent broke ! Can’t even power it from the breakout pins any more. Just attached it to USB like all the other times and … nothing, no blue light …

0 Likes

(Kevin) #24

Very strange, we have tested this just recently on ESD up to 15k volts so this is likely on the problem… @Dreamer3 suggested some problems with overflowing some ram about 2k in causes a problem from reboot but sounds like you are having more power related issues. Your replacement should be in the mail, I’ll want to get those units back from you if I can do more testing.

0 Likes

(Josh Goebel) #25

The only thing you can “break” easily in software is the software triggered “Soft” USB reboot that is how the Arduino software triggers a reboot to get the bootloader to re-flash. If you can’t power your board and you can’t trigger a reset by grounding the RESET pin you’re problem isn’t software (a run-away sketch).

As I’ve been working on Pacman it would often glitch the “Soft” reboot so I added a “soft reset” mode to ArduboyExtra. If you hold down all 4 dpad buttons at once it will trigger a reboot… so I use that now while developing large sketches. I imagine it’d be pretty hard to ever do accidentally… it takes a conscience effort to use my right thumb to hit all the buttons at once. Of course it’s not interrupt driven or anything… it’s just inside my event loop… so it wouldn’t help if had gone into a endless loop or corrupted things really badly. In that case I’d just unplug/replug and use safe mode to reflash.

1 Like

#26

Any tips on finding out what causes the Arduboy to become unresponsive to uploads? Lately it started happening for me with Arduventure and I really don’t know why it happens, I can’t imagine I’m doing anything wrong but it seems I am…

0 Likes

(Scott) #27

@DSSiege11,
I haven’t investigated it but I get the same problem if I try to upload while my Game of Life sketch is running, at least at high speeds. This is with my home built compatible system which uses an Arduino/Genuino Micro. Pausing the game allows uploads without a problem.

It hasn’t bothered me enough to look into it because the Micro has an on board reset switch, as will the production Arduboy.

0 Likes

(Andrew Dent) #28

Memory limit issue?
http://community.arduboy.com/t/cant-re-flash-without-reset-for-larger-program/201

0 Likes

(Scott) #29

Could be. My Life sketch uses over 2K RAM total; 1K for the screen buffer plus 1K for a work area, plus whatever other variables the program uses.

0 Likes

#30

I think my RAM usage is at around 1800-1900. So if I understand correctly I’m actually not doing anything wrong and it’s just an issue of the system?

0 Likes

(Andrew Dent) #31

It seems to have been fixed…

According to GitHub the most recent fix was committed 12 August 2015.
Have you tried downloading the latest version of the Arduino IDE (ARDUINO 1.6.6 - 2015.11.03)?
https://www.arduino.cc/en/Main/Software

If that doesn’t work, it may be another issue… or the fix wasn’t integrated?

1 Like

#32

I’m using 1.6.5 right now so will update to 1.6.6 and see if it solves the issue!

0 Likes

(Kevin) #33

From what I remember there is a memory location somewhere around 2k that stores some value required to reset the device by usb. It looks like maybe thats the fixed code so hopefully?

0 Likes

#34

Alright, it seems like it’s fixed! Readded all the stuff that caused the glitch before and it’s still working fine :slight_smile: It also seems like they did some more optimization cause my sketch is now 300 bytes less in size, yay! Arduventure development can continue :smiley:

2 Likes

Arduventure (RPG)
(Andrew Dent) #35

Awesome! Another example of Open Source FTW :smile:

0 Likes

#36

Sadly it seems like it didn’t fix anything… sigh…

RAM usage is 1,882 bytes and all is fine.

I add a char array to draw text + (add line to draw this text). RAM usage is 1,886 bytes and after an upload it’s broken.

If I don’t add that new char array and just use an existing one then RAM stays at 1,886 bytes and it still works…

At RAM usage 1,886 bytes it also still works but the moment it’s 1,886 bytes it’s broken!

So yeah I don’t know what to do now…

EDIT: Just wanted to check for sure that there’s nothing wrong with my game so I made a new empty project with a large array to fill up the RAM and with that it seems to go wrong when I go over 1,890 bytes. Hope this issue is solvable in some way.

EDIT2: Maybe it’s time to drop Arduino IDE. I just checked the test project on Codebenders and there’s no problem at all.

0 Likes

(Kevin) #37

I think you need another Dev Kit to test against make sure it’s software related not hardware… :slight_smile:

0 Likes

#38

Alright, send me one! :wink:

Just kidding, here’s the test project that causes trouble for me:

https://codebender.cc/sketch:194007 (Download the file and try it in Arduino IDE)

Actually this version does work for me, only when you increase the size of the array to 320 (for example) that it causes the glitch. But as I said, on Codebender it works fine.

0 Likes

(Andrew Dent) #39

So this looks like the original problem… an old issue: https://github.com/arduino/Arduino/issues/1242

0 Likes

#40

I tried with int array[315] (1 893 bytes) and it requires a manual reset to upload a new sketch with Arduino 1.6.6, but also with CodeBender.

With int array[612] (2 487 bytes) the serial monitor cannot connect anymore, but I think that it is a small annoyance.

Thanks @DSSiege11 for the nice test! If a fix is not found upstream, we could maybe ask @bateske to change the bootloader (put bootKeyPtr at 0x9FF instead of 0x800).

2 Likes

(Kevin) #41

Yeah no problem, wow good find. Between finds like this and the sound driver it’s not the worst thing that production is late or we couldn’t have been able to include fixes for everyone!

Thanks this is incredible!

1 Like