You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The attached Gemma M0 MakeCode program hangs consistently after many successful loops.
To Reproduce
Load maker-LFSR-Strip.png into the MakeCode editor at https://maker.makecode.com/#editor. Look at the simulator display to see the desired output -- 1 red LED traversing the strip, then green+blue, then cyan+off+magenta... looping forever. Connect an Adafruit 3811 30-NeoPixel strip to Gemma M0 (black to GND, red to Vout, white to A0). Download the program and see the program work as seen in the simulator (good so far). Then after 3 minutes 44 seconds the program hangs. The Gemma M0 LED blinks Morse code "SOS" and the LED strip (from Gemma M0 out) shows 2 off, magenta, 1 off, cyan, 13 off, blue, green, 10 off (30 total).
Expected behavior
The program should loop forever.
Screenshots
See below.
Desktop (please complete the following information):
Additional context
Setting the "pause" at the end of the "forever" loop to 0 shows the problem much faster, at the same failure state. The Gemma M0 simulator seems to run forever as expected, so the problem seems to be in Gemma M0 not the program. The program is a 16-bit Linear Feedback Shift Register (LFSR), b0 = (b15 xor b14), seed 0x0001, resulting in a 255-state cycle. LFSR bits are mapped to the NeoPixel strip. I am a retired software engineer and adjunct professor, teaching LFSRs in my Digital Logic class.
The text was updated successfully, but these errors were encountered:
Describe the bug
The attached Gemma M0 MakeCode program hangs consistently after many successful loops.
To Reproduce
Load maker-LFSR-Strip.png into the MakeCode editor at https://maker.makecode.com/#editor. Look at the simulator display to see the desired output -- 1 red LED traversing the strip, then green+blue, then cyan+off+magenta... looping forever. Connect an Adafruit 3811 30-NeoPixel strip to Gemma M0 (black to GND, red to Vout, white to A0). Download the program and see the program work as seen in the simulator (good so far). Then after 3 minutes 44 seconds the program hangs. The Gemma M0 LED blinks Morse code "SOS" and the LED strip (from Gemma M0 out) shows 2 off, magenta, 1 off, cyan, 13 off, blue, green, 10 off (30 total).
Expected behavior
The program should loop forever.
Screenshots
See below.
Desktop (please complete the following information):
Additional context
Setting the "pause" at the end of the "forever" loop to 0 shows the problem much faster, at the same failure state. The Gemma M0 simulator seems to run forever as expected, so the problem seems to be in Gemma M0 not the program. The program is a 16-bit Linear Feedback Shift Register (LFSR), b0 = (b15 xor b14), seed 0x0001, resulting in a 255-state cycle. LFSR bits are mapped to the NeoPixel strip. I am a retired software engineer and adjunct professor, teaching LFSRs in my Digital Logic class.
The text was updated successfully, but these errors were encountered: