problems of OpenMV4Plus SDRAM

Discussion related to "under the hood" OpenMV topics.
Posts: 3
Joined: Thu Mar 05, 2020 11:11 pm

problems of OpenMV4Plus SDRAM

Postby duojibu » Thu Mar 05, 2020 11:26 pm

Hi! I made openmv4plus according to your design on GitHub. It works properly. I can see that SDRAM plays a role in some programs. But there are still many functions I want that I can't use SDRAM。Such as' image.copy '. Keeping a few images will prompt that run out of memory. Will SDRAM support all functions in the future?
User avatar
Posts: 4271
Joined: Sun May 24, 2015 2:10 pm

Re: problems of OpenMV4Plus SDRAM

Postby kwagyeman » Fri Mar 06, 2020 12:52 am

You have to use extra frame buffers. Please use the alloc_extra_fb() command to make another frame buffer and then use copy with the load_to_fb argument targeting the other frame buffer. This will allow you to make image copies. I updated the firmware last year such that for every command that creates a new image can also target an image buffer to move an image there.

Doing things this way is a little more static as it requires you to plan out what buffers you need for things but works much better without fragmenting ram.

The heap for MicroPython is still in SRAM. The MicroPython heap isn't really designed to get large but the frame buffer is. If we moved the MP heap to SDRAM we actually wouldn't be able to make it very large.

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 11 guests