I’m currently evaluating the openMV CAM RT1062 and the openMV H7 Pro for a project and am impressed with both the product quality and the support system. Our decision between the two models hinges on the ease of enabling I2S communication.
For the RT1062, I’ve found existing I2S drivers that suggest DMA and non-DMA options:
src/hal/mimxrt/MIMXRT1062/drivers/fsl_flexio_i2s_edma.c(DMA, less CPU-intensive but more complex coding)
src/hal/mimxrt/MIMXRT1062/drivers/fsl_flexio_i2s.c(non-DMA, easier to code but more CPU-intensive)
However, integrating these drivers within the MicroPython environment and connecting them to the higher-level system components is not straightforward to me, especially when looking at:
My goal is to enable both DMA and non-DMA I2S functionalities on the RT1062, akin to how I2S is implemented on a Teensy 4.1 (as documented here). Despite the RT1062 lacking dedicated I2S pins, we have a workaround for pin routing that we’re eager to test and provide feedback on.
With this context, I have several questions to better understand how to proceed:
- Firmware Compilation for I2S Drivers: How can I integrate and compile the existing I2S drivers (either the RT1062’s or any suitable for the H7) into the firmware? Is there a specific process or tools recommended for incorporating these drivers?
- Pin Multiplexing (MUX) Configuration: What steps are required to configure the chip’s MUX settings for I2S functionality? Are there particular files or sections within the project where these settings should be defined?
- Architecture Layers for I2S Integration: Could you clarify the necessary layers for integrating I2S? Specifically, is it sufficient to have one C/C++ driver alongside a Python wrapper, or are additional layers needed?
- Inclusion of
machine_i2s.c: If a specific file like
machine_i2s.cis essential for I2S functionality, how should it be included and adapted for our use case? Are there examples or guidelines on modifying such a file to work with our drivers?
- Python Wrapper Development: Lastly, where and how should the Python wrapper be created to make I2S functionalities accessible through MicroPython’s
machinemodule? Are there particular conventions or best practices for developing this wrapper?
Thank you in advance for your guidance and support. I look forward to contributing to the community based on our findings and experience.
Best regards, Casper