Maixduino - Blink expectations

Hello,

I am trying my first Arduino sketch with Maixduino but I have run into teething issues. I did not change any code in the standard Arduino supplied code and the compiler did not complain with any warnings/errors. After I get the Done uploading messaging, I see the following text in the output window:
Downloading ISP: |=================================================================| 100.0% 10kiB/s
[INFO] Booting From 0x80000000
[INFO] Wait For 0.1 second for ISP to Boot
[INFO] Boot to Flashmode Successfully
[INFO] Selected Baudrate: 1500000
[INFO] Baudrate changed, greeting with ISP again …
[INFO] Boot to Flashmode Successfully
[INFO] Selected Flash: On-Board
[INFO] Initialization flash Successfully

Programming BIN: |================================---------------------------------| 50.0% 54kiB/s

Programming BIN: |=================================================================| 100.0% 55kiB/s
[INFO] Rebooting... 

But there is no blinking of any on-board LED. I am assuming that the define for LED_BUILTIN is assigned to pin 13 and I would expect a green LED to blink. Two questions, please:

  1. List item Why is the output window “stuck” at [INFO] Rebooting…?

  2. List item Will any on-board LED blink through this standard Arduino sketch?

Thanks.

I use the MaixGo board with platformio in vscode, so your mileage may vary:

  1. This seems to be normal output. You can always print something in the code and it should show up in a serial monitor.

  2. On my board the standard blink sketch results in the multicolor LED blinking blue. In the maixduino code I can see in …/variants/sipeed_maix_go/pins_arduino.h that the LED_BUILTIN is indeed assigned to pin 13. This is also the case for the maix one, but I am not sure about other boards.

Hello Sentry,

Thank you for your reply. I am glad that you were able to blink the on-board LED. :slight_smile:

I am confused though a little bit:

  • at https://maixduino.sipeed.com/en/cores/constants.html the LED_BUILTIN is described as the equivalent of green; so it begs the questions how you saw blue?

  • As I noted in my original message, the Arduino IDE status bar confirms “Done uploading…” when the output window displays “[INFO] Initialization flash Sucessfully” Ater that there are progressive messages for “Programming BIN” and then “[INFO] Rebooting…” At this point it appears that the system is halted and, of course, there is no blinking LED.

Can you please help me understand if my interpretation of the system being halted is correct? Do you see any message(s) after “[INFO] Rebooting…?”

I could only work to the extent that I progressed this far by setting baudrate to 1.5Mbps. None of the other values worked for me. I feel that there is a lot for me to learn/read before I even try the simplest blinking exercise. Any guidance you can provide will be sincerely appreciated.

Kind regards.

Hello Sentry,

I took your advice and inserted Serial.begin(9600) and Serial.println(“Hello MAiXDUino”) in the setup procedure and a Serial.println(“Looping…”) in the loop procedure.

No output was observed in the serial monitor window even though the baud rate for the window was matched with that in the code.

Also, for what it is worth, a red LED turns ON when the upload is started and it turns OFF when the message “[INFO] Initialization flash Successfully” is completed. The serial monitor window does not display the two lines or Serial.println statements.

What would make the Rebooting incomplete? What does your output window display as the final lines once the code starts executing?

Thanks for your assistance. Kind regards.

I think the rebooting is compleet!

If I upload the compiled sketch with kflash (python3 ~/bin/kendryte/kflash.py/kflash.py -b 2000000 -p /dev/ttyACM0 -B goE firmware.bin) I get:

[INFO] COM Port Selected Manually: /dev/ttyACM0
[INFO] Default baudrate is 115200 , later it may be changed to the value you set.
[INFO] Trying to Enter the ISP Mode…
*
[INFO] Greeting Message Detected, Start Downloading ISP
Downloading ISP: |==================================================================================| 100.0% 10kiB/s
[INFO] Booting From 0x80000000
[INFO] Wait For 0.1 second for ISP to Boot
[INFO] Boot to Flashmode Successfully
[INFO] Selected Baudrate: 2000000
[INFO] Baudrate changed, greeting with ISP again …
[INFO] Boot to Flashmode Successfully
[INFO] Selected Flash: On-Board
[INFO] Initialization flash Successfully
Programming BIN: |==================================================================================| 100.0% 22kiB/s
[INFO] Rebooting…

From your other post I gather that you have the Maixduino board. According to the maixduino code the builtin led should be connected to 13. According to the schematic the green led is connected to pin 13. So I would expect the green LED to blink. For the MaixGo board, which I have, the blue LED is connected to pin 13. So that explains the color.

With my board I have noticed that now and then after uploading the code I have to push the reset button before the firmware actually starts.

I added the serial print statements you mentioned and it works for me (in vscode using platformio).

Hello Sentry,

Thanks once again for the detailed explanation - it really helps me.

My board is Sipeed Maixduino Kit for RISC-V AI + IoT
This board has the USB-Type C interface; therefore my port is /dev/ttyUSB0

I pushed the Reset button (after reading your advice) but I did not experience any change in response from the board. The attached display flashes momentarily but there is no other change. (There are two button - Boot and RST). I was careful to press the RST button.

Again, thank you for your feedback. I will continue to tweak parameters and keep on trying hoping to avoid self-inflicted operator errors on my part.

Kind regards.

Quick question here, please, since I noticed that you mentioned VS Code.

  • Did you have to install any Extensions (for VS Code) other than Arduino?
  • How did you get the board to be recognized by VS Code? (I haven’t tried anything here but since I have VS Code on the same desktop, perhaps I will try it too just like I did for the AZ3166. :slight_smile:
  • Again, I can see /dev/ttyUSB0 (Kongu_Hikari) for the port under VS Code serial comm status bar. :smiley:

Thanks for all your help.

Kind regards.

OK, I can see the choice for Maixduino(k210) by Sipeed but obviously my specific board, RISC-V AI + IoT, is not supported per the below when I tried to install v0.3.8:

Picked up JAVA_TOOL_OPTIONS:
Loading configuration...
Initializing packages...
Preparing boards...
java.lang.NullPointerException
at processing.app.BaseNoGui.onBoardOrPortChange(BaseNoGui.java:679)
at processing.app.Base.onBoardOrPortChange(Base.java:1317)
at processing.app.Base.<init>(Base.java:284)
at processing.app.Base.main(Base.java:151)
[Error] Exit with code=255

Will need to wait for update/upgrade from Sipeed for board support definitely for VS Code but perhaps this is my problem with Arduino IDE too. What do you think?

Kind regards.

And only now I remember that I did have problems with getting output from maixduino (sorry, I have to remember too many things, and I am not made for that).
In a closed issue with maixduino (actually, the first issue!) I mention I had problems getting output (with the arduino IDE, but also with other serial monitors). The issue was never resolved for me, but I do not have these problems with platformio.

On the platformio website the maixduino board is not listed. But in my fully upgraded (and I think with developer option set, because of some python2 vs python3 problem) I do see the maixduino board listed! So you can try if it works for you as well if you already have vscode!

Dear baqwas,

I am not sure we are facing the same issue. Today, I try to use plaftormio
[env:sipeed-maix-go]
platform = kendryte210
framework = arduino
board = sipeed-maix-go
monitor_speed = 115200
upload_port = COM13
board_upload.burn_tool = goD
board_upload.speed = 3000000

It reports an error
Uploading .pioenvs\sipeed-maix-go\firmware.bin
[INFO] COM Port Selected Manually: COM13
[INFO] Default baudrate is 115200 , later it may be changed to the value you set.
[INFO] Trying to Enter the ISP Mode…
###############
[ERROR] No vaild Kendryte K210 found in Auto Detect, Check Your Connection or Specify One
by-p COM3
*** [upload] Error 1
================== [ERROR] Took 10.58 seconds ==============================
The terminal process terminated with exit code: 1

Did you receive similar error message?

Are you sure it is connected to COM13? Usually platformio is good at finding out itself which port your board is connected to. Also, depending on which firmware you have in the communication layer, you may need to use goE instead of goD.

Maix Go with open-ec firmware

Board=goE

Maix Go with CMSIS-DAP firmware

Board=goD

Thanks a lot!! :slight_smile: