Build Firmware for GENX320 NFL, STC, and ERC Filters

Hello OpenMV Team,
I’m trying to build the firmware for the GENX320’s Noise Filter (NFL), Spatio-Temporal Contrast Filter (STC), and Event-Rate Controller (ERC). While the firmware I wrote for each filter successfully built, I’m running into some problems actually flashing the OpenMV board with my custom firmware. It seems to flash, but when I click the connect button in OpenMV IDE, it hangs forever. Would it be possible for you to take a look at the firmware I wrote and see if there’s anything that might cause this issue?

For reference, my fork with the ERC and STC branches are here (haven’t touched the NFL yet): GitHub - jeff-shulkin/openmv: OpenMV Camera Module

For additional context, I am building the firmware itself through WSL on Windows for the OpenMV H7 Plus board. I am also erasing the internal FAT filesystem and resetting the ROMFS file system each time I flash the custom firmware.

You need to upgrade to the latest IDE: Download – OpenMV

The tip of dev using the new USB protocol.

I’ll update file that tells everyone to upgrade in a month or so.

Thanks for the tip, I should have checked the IDE version. With that, the IDE connects properly, but I’m running into another problem specifically with the STC.

According to the GENX320 datasheet/STC-specific code, the event clock frequency specifically needs to be 10, 25, or 50 MHz. I passed in the EVT_CLK_FREQ macro into psee_stc_only_activate, and since EVT_CLK_FREQ is 48 MHz (at least on the H7 Plus), it failed with error code STC_CLK_ERROR. Is there any other macro I should be using that would correctly pass in 10, 25, or 50 MHz based on system settings?

You’ll need to modify the code to just handle that freq. For the EHC we just removed the check and it was fine. I verified this was okay with Prophesee.

For the STC… however, it looks like they lookup some params based on the freq. I’d just copy the 50Mhz settings for 48MHz.

Sounds good. Got another question concerning the NFL and ERC filters. I noticed that the STC filter had functions already provided in drivers/genx320/src/psee_genx320.c provided by Prophesee. Is it appropriate to alter the psee_genx320 files to add support for the ERC, NFL, and ideally the system monitoring events? I extended the ERC and NFL filters to match the same structure as the other filters, but I wasn’t sure if it was alright to extend the event processing itself to include system monitoring events.

Yes, it’s fine to extend; however, assuming you have an NDA in place with prophesee and etc. just ask them for the updated sdk code. We did this for histogram support, and it turned out they had written a lot of it already. If you need to write it yourself, follow the application note guideline, but I’d recommend just getting the firmware differences from them directly.

Whatever the case, these features can be in a new PR.

I actually haven’t contacted them concerning the firmware update. What is the best way to contact them to get these firmware differences?

Use the main contact email on their website or form.

I just heard back from the Prophesee folks, and support said that they do not have the updated SDK code for the ERC or NFL. I have a hacked together version that is close to (what I think) prophesee would put together based on their STC-related code, but I can’t ensure its validity, as there were a couple steps in mimicking the drivers described in their datasheets that I wasn’t able to figure out how to reproduce. For now, I can work without the ERC and NFL filters.