Inkplate Motion 6 upload fails with timeout at address 0x8000400

Customer:

I’ve purchased an Inkplate Motion 6 and am having trouble programming it. I managed to connect and upload one of the example programs once, but further attempts fail with the following error:

Sketch uses 448652 bytes (21%) of program storage space. Maximum is 2097152 bytes.
Global variables use 81512 bytes (15%) of dynamic memory, leaving 442776 bytes for local variables. Maximum is 524288 bytes.

STM32CubeProgrammer v2.18.0

Serial Port cu.usbserial-210 is successfully opened.
Port configuration: parity = even, baudrate = 230400, data-bit = 8, stop-bit = 1.0, flow-control = off

Timeout error occured while waiting for acknowledgement.
Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again…
Failed uploading: uploading error: exit status 1

Originally submitted via email support on 13 January 2025. Migrated to the forum for community visibility.

Soldered Support:

Press the “PROG” button on the side of the device. If you have the enclosure, you will need to use the supplied tool to press this button as it’s made to be hidden so it doesn’t accidentally get pressed when the device is in use.

Attachment omitted in migration: image.png

Customer:

I have been using the program button - it’s how I initially programmed one of the examples onto the board. Further attempts don’t seem to work. I tried a short press, long press, holding the program button while uploading. Nothing seems to work. I’ve also tried these combinations with the power on and off. I have the motion 6 board selected in the IDE as well as the correct USB COM port. The device seems to be detected by Arduino IDE.

Attachment omitted in migration: image.png

Soldered Support:

Try unplugging Inkplate, holding down the programming button and then plugging it back in. Then try uploading a basic example of code, like a blank sketch first.

Customer:

That didn’t seem to help. I tried several combinations of unplug, hold program, plug / unplug press and release program, plug / power down, press program, plug in etc. Nothing seems to work. I’m trying to upload the same program that worked on the first successful upload: Inkplate_Motion_6_Simple_Grayscale.

Attachment omitted in migration: Screenshot 2025-01-14 at 9.23.53 AM.png

Soldered Support:

When programming mode is active, a message will be written to Inkplate MOTION’s serial port at 115200 baud: ‘Programming mode active.’ Can you confirm that you see this message when monitoring this port?

It’s strange that it worked once but doesn’t seem to work again. Has anything changed in your configuration? USB cable, port, or something like that?

It may have something to do with the fact you’re on Mac because upload speeds on Mac need to be a bit lower (115200 baud for Arduino ESP32, as with other Inkplate models).

Customer:

I checked the serial monitor and nothing comes through when I press the program button or any other button. The device seems to be connecting to the port successfully however.

It is strange that it worked once. I uploaded the first program successfully, opened the next example I wanted to test and then uploading stopped working. The screen is displaying the Welcome to Inkplate image from the example I uploaded.

I’m using the same high quality Belkin USB cable and I’ve tried all the USB ports on my MacBook.

I can see in the serial monitor the baud rate is 115200, so that’s probably not the issue.

Attachment omitted in migration: Screenshot 2025-01-14 at 10.38.36 AM.png

Soldered Support:

Make sure Inkplate is plugged in and powered on. Locate the BOOT0 switch on the back, it’s right below the ESP32. Turn this switch to 1, press the RESTART button on the back of the board. Now you should be able to upload code. Upload an example with the Inkplate 6MOTION board definition. It should upload; you can then return the boot switch to 0. Now, if pressing the programming button and uploading again doesn’t seem to work, it may be something with the board definition that’s wrong.

I suggest re-installing it from Arduino. Here’s how to do a clean reinstall:

Delete Inkplate Motion Boards

  • Open the Arduino IDE
  • Go to Arduino > Preferences in the menu bar
  • Note the location of the “Sketchbook location” and “Additional Board Manager URLs” fields
  • Remove the URL for Inkplate Motion boards if listed
  • Close Arduino IDE

Delete Arduino Cache

  • Navigate to ~/Library/Arduino15/packages/ in Finder
  • Locate the folder for Inkplate Motion boards (e.g., soldered or related folder name)
  • Delete the folder

Clear Board Manager Cache

  • Go to ~/Library/Arduino15/
  • Delete the staging folder (this stores cached board files)
  • Delete the package_index.json and package_index.json.sig files

Clean Reinstall of Inkplate Motion Boards

Verify Installation

  • Select an Inkplate Motion board under Tools > Board
  • Compile an example sketch to ensure proper installation

Customer:

I followed your instructions with regards to switching to boot 1, pressing restart and trying to upload. It seemed to have gone further or logged something different but it still fails. I then tried the next set of instructions to delete and reinstall the board definition and it still isn’t working. Here are the logs:

Sketch uses 448652 bytes (21%) of program storage space. Maximum is 2097152 bytes.
Global variables use 81512 bytes (15%) of dynamic memory, leaving 442776 bytes for local variables. Maximum is 524288 bytes.


STM32CubeProgrammer v2.18.0

Serial Port cu.usbserial-210 is successfully opened.
Port configuration: parity = even, baudrate = 230400, data-bit = 8, stop-bit = 1.0, flow-control = off
Activating device: OK
Board : –
Chip ID: 0x450
BootLoader protocol version: 3.1
Device name : STM32H7xx
Flash size : 2 MBytes (default)
Device type : MCU
Device CPU : Cortex-M7
Opening and parsing file: Inkplate_6_Motion_Simple_Grayscale.ino.bin

Memory Programming …
File : Inkplate_6_Motion_Simple_Grayscale.ino.bin
Size : 438.86 KB
Address :

Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 3]
Download in Progress:

Timeout error occured while waiting for acknowledgement.

Error: Write Operation fails at address 0x8000400

Error: failed to download
Error: failed to download the File
Failed uploading: uploading error: exit status 1

Soldered Support:

Good to see that the port was opened, the sketch has compiled and code upload has started. The board was fully set in programming mode.

It fails at a certain address, which means that part of the code did get uploaded. I believe it could be the serial upload speed being too high that’s causing this.

To lower the upload speed, locate the board definitions directory. For the Inkplate MOTION boards, the directory path is:

~/Library/Arduino15/packages/Inkplate/hardware/Inkplate_MOTION/{version}/

Open the folder.

Step 2: Open and Modify platform.txt

Inside the directory, locate the platform.txt file:

~/Library/Arduino15/packages/Inkplate/hardware/Inkplate_MOTION/{version}/platform.txt

Open the file in a text editor.

Step 3: Add the Baud Rate Argument

Find the following section in the file:

tools.stm32CubeProg.upload.pattern="{busybox}" sh "{path}/{cmd}" {upload.protocol} "{build.path}/{build.project_name}.bin" {build.flash_offset} {upload.options}

Modify it to include the --baudrate argument. The updated line should look like this:

tools.stm32CubeProg.upload.pattern="{busybox}" sh "{path}/{cmd}" {upload.protocol} "{build.path}/{build.project_name}.bin" {build.flash_offset} {upload.options} --baudrate 115200

Step 4: Save and Restart Arduino IDE

Save your changes to platform.txt. Restart the Arduino IDE to load the updated definitions.

Step 5: Verify the Changes

Open the Arduino IDE. Select the Inkplate 6 MOTION board. Compile and upload a sketch to ensure that the new baud rate works.

Note: I believe this is the correct way to add the baud rate to the command, though I apologize in advance if it doesn’t work on Mac as I have a Windows machine right now, but I believe it should be universal.

Customer:

Today I’ve been using the Inkplate_6_Motion_Simple_1Bit.ino example and I managed to get it to upload by setting boot to 1 and restarting. This is the smallest example so it generally uploads fine with the current baud rate. After upload, I switch back to boot 0 and am able to upload the example again with the program button. When I switch to a more complicated example it fails again and won’t upload even the simple example without doing the boot 1/restart method.

When I follow the steps you provided to change baudrate, it looks like it changes the baudrate after upload when running the program. I get the following error after a successful upload of the simple example:

Error: Wrong command --baudrate 115200: Unknown command or command missed some parameters

I also tried this variation which was used for the “blackmagic upload for generic STM32” definitions:

tools.stm32CubeProg.upload.speed=115200
tools.stm32CubeProg.upload.pattern="{busybox}" sh "{path}/{cmd}" {upload.protocol} "{build.path}/{build.project_name}.bin" {build.flash_offset} {upload.options}

That didn’t seem to work either unfortunately.

Soldered Support:

I understand from the ticket you’re using your own quality USB cable, is it by chance USB C to C? If not, I suggest trying that.

I still think lowering the baud rate could fix the problem. The real upload speed parameter is in:

\Arduino15\packages\Inkplate_Motion\tools\STM32Tools\2.2.1-0\stm32CubeProg.sh

Here, find the number 230400 and replace with 115200. It should be in some code that looks like this:

tools.stm32CubeProg.upload.pattern=... 230400 ...

Replace 230400 with 115200. This has worked on Windows machine and since it’s a .sh script ran via busybox, it should be the same on Mac.

If this doesn’t work, we will gather the rest of the team to test upload on Mac and find the fix. If this indeed is the solution, we will work on updating the board definition for Inkplate6MOTION to include this as an option in the Tools menu.

Attachment omitted in migration: image.png

Attachment omitted in migration: image.png