tessel / t1-firmware

[UNMAINTAINED] Tessel 1 Firmware
Other
68 stars 20 forks source link

Adds js binding to reset the tessel. #140

Closed peterhgombos closed 9 years ago

peterhgombos commented 9 years ago

Calling tessel.reset_board() in a js program now resets the tessel, allowing for programmatically reset. Fixes #124.

jiahuang commented 9 years ago

Do we also want to reset the CC3000 wifi chip? It also holds state, and resetting the main chip while there are sockets open or something might mess up wifi later. But we also have separate wifi reset functions, so I'm leaning towards leaving the behavior as-is.

Don't know if there are any other ramifications of jumping back to the start address. @kevinmehall @tcr?

kevinmehall commented 9 years ago

jump_to_flash resets most LPC1800 peripherals, and should work fine for this.

Doesn't the startup process reset the CC3000? This is effectively the same as pressing the reset button, and I thought that triggered a CC3000 reset via the startup code.

johnnyman727 commented 9 years ago

@kevinmehall as far as I can tell, the software enable line of the CC is toggled but I don't believe the chip is reset.

peterhgombos commented 9 years ago

I haven't tested the wifi through a software reset with this method, but the leds are flashing exactly like I've pressed the button.

johnnyman727 commented 9 years ago

r+ from me. Somebody else want to confirm and merge?

jiahuang commented 9 years ago

Tested, works for me.