ArduinoCore-mbed icon indicating copy to clipboard operation
ArduinoCore-mbed copied to clipboard

[AE-49] Chopped up video output from the Nicla Vision

Open aliphys opened this issue 2 years ago • 1 comments

The data sent from CameraCaptureRawBytes.ino sketch uploaded to a Nicla Vision board is displayed as chopped up output in Processing 4.2 by the CameraRawBytesVisualizer.pde sketch.

image

Testing with the OpenMV IDE results in a smooth 20 FPS video feed, suggesting that the Nicla Vision board in question is healthy.

image

Compile
PS C:\Users\user\AppData\Local\Temp\.arduinoIDE-unsaved2023311-38456-1j6f6yl.zru7\CameraCaptureRawBytes> arduino-cli compile -b arduino:mbed_nicla:nicla_vision
Sketch uses 134312 bytes (6%) of program storage space. Maximum is 1966080 bytes.
Global variables use 54464 bytes (10%) of dynamic memory, leaving 469160 bytes for local variables. Maximum is 523624 bytes.

Used library Version Path
Camera       1.0     C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\mbed_nicla\4.0.2\libraries\Camera
GC2145               C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\mbed_nicla\4.0.2\libraries\GC2145
Used platform      Version Path
arduino:mbed_nicla 4.0.2   C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\mbed_nicla\4.0.2

Upload
PS C:\Users\user\AppData\Local\Temp\.arduinoIDE-unsaved2023311-38456-1j6f6yl.zru7\CameraCaptureRawBytes> arduino-cli upload -p COM35 --fqbn arduino:mbed_nicla:nicla_vision
TOUCH: error during reset: opening port at 1200bps: Invalid serial port
dfu-util 0.10-dev

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Warning: Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 2341:035f
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash   "
Downloading element to address = 0x08040000, size = 136668
Erase           [=========================] 100%       136668 bytes
Erase    done.
Download        [=========================] 100%       136668 bytes
Download done.
File downloaded successfully
Transitioning to dfuMANIFEST state

aliphys avatar Apr 11 '23 04:04 aliphys

Some research 🔍 :

  • The image I see, is similar to the buffer sync issue for which a fix was submitted in #143 for Mac by @sebromero. https://github.com/arduino/ArduinoCore-mbed/pull/122 also includes relavent attempts to fix this issue
  • Possible reason for this problem is "handling the stream as an ASCII stream rather than binary and likely that is causing things like CR to be translated to CRLF" https://github.com/arduino/ArduinoCore-mbed/issues/112#issuecomment-756683637
  • Multiple users have mentioned problems on Windows:
    • https://github.com/arduino/ArduinoCore-mbed/issues/112#issuecomment-751781224
    • https://github.com/arduino/ArduinoCore-mbed/issues/559#issuecomment-1266893568
    • https://github.com/arduino/ArduinoCore-mbed/pull/143#issuecomment-1097665179

aliphys avatar Apr 11 '23 05:04 aliphys