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

Code stops working after few seconds on Maix M1 Dock #37

Open
narduzzi opened this issue May 25, 2023 · 4 comments
Open

Code stops working after few seconds on Maix M1 Dock #37

narduzzi opened this issue May 25, 2023 · 4 comments

Comments

@narduzzi
Copy link

narduzzi commented May 25, 2023

Hello,

I am tying to run the hello_world.py scripts but it crashes after a few seconds of running.

# Hello World Example
#
# Welcome to the CanMV IDE! Click on the green run arrow button below to run the script!

import sensor, image, time, lcd

lcd.init()                          # Init lcd display
lcd.clear(lcd.RED)                  # Clear lcd screen.

# sensor.reset(dual_buff=True) # improve fps
sensor.reset()                      # Reset and initialize the sensor.
sensor.set_pixformat(sensor.RGB565) # Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.QVGA)   # Set frame size to QVGA (320x240)
#sensor.skip_frames(time = 2000)     # Wait for settings take effect.
#clock = time.clock()                # Create a clock object to track the FPS.

while(True):
   #clock.tick()                    # Update the FPS clock.
    img = sensor.snapshot()         # Take a picture and return the image.
    lcd.display(img)                # Display image on lcd.
    #print(clock.fps())              # Note: CanMV Cam runs about half as fast when connected
                                    # to the IDE. The FPS should increase once disconnected.

To Reproduce
Steps to reproduce the behavior:

  1. Build firmware from kpu/featwith nncase 1.8.0 support for Maix M1 Dock (using project canmv_dock).
  2. Flash Micropython v1.0.5-5-ge1b2766-dirty on 2023-05-24; CanMV_Board with kendryte-k210
  3. Connect to IDE
  4. Run hello_world.pyscript. Output is:
init i2c:2 freq:100000
[CANMV]: find ov2640
[CANMV]: find ov sensor
...crash

What could be the source of the problem?
Not sure of it, but it seems related to the data transfer in the IDE.
The code following code works:

import sensor, image, time, lcd

lcd.init()                          # Init lcd display
lcd.clear(lcd.RED)                  # Clear lcd screen.
sensor.reset()                      # Reset and initialize the sensor.
sensor.set_pixformat(sensor.RGB565) # Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.QVGA)   # Set frame size to QVGA (320x240)
time.sleep(2)

while(True):
    print(0)
    time.sleep(0.2) # removing this line makes the code crash.

Configuration

  • IDE version: 2.9.2
  • Firmware version: v1.0.5-5-ge1b2766-dirty
  • Board: Sipeed Maix Dock M1
  • OS: MacOS Ventura
@narduzzi
Copy link
Author

The error seems to originate from the IDE as the code continues to run on the chip.

@kendryte747
Copy link
Collaborator

Update IDE to the lastest version.

@narduzzi
Copy link
Author

Hi @kendryte747, I have updated my IDE to the latest release (Commit: v2.9.2-2-0-g132467a), but the bug is not solved. Is it originating from the editor of from the firmware?

@kendryte747
Copy link
Collaborator

Hi @kendryte747, I have updated my IDE to the latest release (Commit: v2.9.2-2-0-g132467a), but the bug is not solved. Is it originating from the editor of from the firmware?

Disable framebuffer dump can run continuously?

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

No branches or pull requests

2 participants