Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenCR 1.0 firmware upload is failed because of flash erase timeout #311

Open
chjej202 opened this issue Jun 15, 2022 · 5 comments
Open

Comments

@chjej202
Copy link

Hello,

I got an error during uploading my firmware on OpenCR 1.0 board.

The error message is shown in the following screenshot.
capture

I noticed that the error is happened during flash erase, and I found that the timeout is happened because flash erase time took more than 3 seconds.

if( msg_get_resp(0, &rx_msg, 3000) == TRUE )

For this reason, I changed the above code from 3000 to 5000 to increase the timeout value.
After I build and replace opencr_ld command, it works fine for me.

I think 3 seconds is too short to upload large firmware, so please increase the timeout value.

@ROBOTIS-Will
Copy link
Contributor

Hi @chjej202

Thank you for reporting the issue.
The timeout error during the flash upload is unusual as we test the upload procedure with provided firmware.
Could you give us more information about your development environment?
Assuming from the size of the 517KB binary file, are you uploading a customized firmware?

@chjej202
Copy link
Author

The timeout is happened when the binary file is very large.
In my environment, it took around 3 seconds for uploading 500KB-size binary file. (510KB - flash upload ok (flash erase time: 2.9xx seconds), 512KB - flash erase timeout happened)
I think that flash erase took several seconds to erase several hundreds of kilobytes.

Because of this issue, I cannot fully use all the flash memory provided by OpenCR 1.0 (768KB) unless the timeout value is not changed.

Our binary file includes lots of memory-burden examples. It includes arduino tensorflow lite for person detection, jpeg decoder, arduino cam, and code for accessing sensors and motors.

@ROBOTIS-Will
Copy link
Contributor

@chjej202

Thanks for the details and how interesting that you are running the tensorflow on OpenCR!

Quite long ago, I uploaded the OV7725 + TFT OpenCR example, but wasn't able to expand to the proper image processing or machine learning.

If your project can be disclosed to the public via OpenCR eManual, it'd be an amazing OpenCR tensorflow example.

@chjej202
Copy link
Author

I uploaded my code related to use Arduino tensorflow lite on OpenCR 1.0.

I only changed and tested a person detection example only, but I think you can easily modify and run other examples also.
You can check the commit logs to find which parts are modified.

Modified code to run ArduCAM library on OpenCR 1.0 board: https://github.com/chjej202/Arduino
Modified code to run Arduino Tensorflow lite library on OpenCR 1.0 board: https://github.com/chjej202/Arduino_TensorFlowLite

Arduino tensorflow lite code was modified based on the code uploaded in https://www.arduino.cc/reference/en/libraries/arduino_tensorflowlite

@ROBOTIS-Will
Copy link
Contributor

@chjej202
Super!!!
Thanks for sharing your repos.
We'll try them and share with developers through eManual and OpenCR examples.
Have a great weekend ahead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants