# Updating VOXL2 IO board errors

Source: https://forum.modalai.com/topic/1159/updating-voxl2-io-board-errors
Category: VOXL 2 and VOXL 2 Mini (https://forum.modalai.com/category/26/voxl-2-and-voxl-2-mini)
Tags: voxl-2
Posted: 2022-07-26 18:28:16 UTC by Zachary Lowell
Replies: 1 · Views: 722

## Zachary Lowell · 2022-07-26 18:28:16 UTC

Trying to update the voxl2 IO board via a jlink/stlink connection but I am receiving the following output: 

```
****** Error: Failed to prepare RAMCode using RAM
Communication timed out: Requested 24 bytes, received 0 bytes !
Target voltage too low (1 Volt is required, Measured: 0.0 Volt).
Unspecified error -1
J-Link>loadbin v1.11.4-0.0.2-modalai_voxl2io-v2.bin,0x08001000
Downloading file [v1.11.4-0.0.2-modalai_voxl2io-v2.bin]...
CPU could not be halted

****** Error: Failed to prepare for programming.
Could not preserve target memory.
Cannot read register 16 (XPSR) while CPU is running
Cannot read register 20 (CFBP) while CPU is running
Cannot read register 0 (R0) while CPU is running
Cannot read register 1 (R1) while CPU is running
Cannot read register 2 (R2) while CPU is running
Cannot read register 3 (R3) while CPU is running
Cannot read register 4 (R4) while CPU is running
Cannot read register 5 (R5) while CPU is running
Cannot read register 6 (R6) while CPU is running
Cannot read register 7 (R7) while CPU is running
Cannot read register 8 (R8) while CPU is running
Cannot read register 9 (R9) while CPU is running
Cannot read register 10 (R10) while CPU is running
Cannot read register 11 (R11) while CPU is running
Cannot read register 12 (R12) while CPU is running
Cannot read register 14 (R14) while CPU is running
Cannot read register 15 (R15) while CPU is running
Cannot read register 17 (MSP) while CPU is running
Cannot read register 18 (PSP) while CPU is running
Tar
Unspecified error -1
J-Link>r
Reset delay: 0 ms
Reset type UNKNOWN: ???
J-Link>q

Script processing completed.
```

Any direction would be great.

## Reply by modaltb (ModalAI staff) · 2022-08-12 14:18:25 UTC

We resolved offline, but ended up have Zach use an STLink.

How to build FW is here:  https://docs.modalai.com/voxl2-io-firmware/

And here's an example using STLink (download from ST's site...)
```
BL_FW_FILE="modalai_voxl2_io_bl.bin"
BL_FLASH_START_ADDR="0x8000000"

APP_FW_FILE="modalai_voxl2io-v2.bin"
APP_FLASH_START_ADDR="0x08001000"

if ! [ -f "${BL_FW_FILE}" ]; then
    exit 10
fi
if ! [ -f "${APP_FW_FILE}" ]; then
    exit 11
fi

echo "erasing..."
sleep 1
STM32_Programmer_CLI -c port=SWD -e all

echo "programming bootloader..."
sleep 1
STM32_Programmer_CLI -c port=SWD -w "${BL_FW_FILE}" "${BL_FLASH_START_ADDR}" -v

echo "programming application..."
sleep 1
STM32_Programmer_CLI -c port=SWD -w "${APP_FW_FILE}" "${APP_FLASH_START_ADDR}" -v

echo "resetting..."
sleep 1
STM32_Programmer_CLI -c port=SWD -hardRst
```
