It can be done 2 ways, one way is with a IO coprocessor as it has ADC and timers for servos, or it can use separate hardware like a PCA9685 i2c servo driver and i2c ADC,
Yes, that’s the code for an STM32 coprocessor.
I doubt that there’s any other documentation for the pixhawk IOMCU.
What exactly do you want to accomplish?
I don’t have many peripherals(CAN, PWM, ADC,…etc) of my RPI 4 so I want to extend its capability via IOMCU.
I would like to implement IOMCU that collect all information from sensors ( ADC, GPS, IMU,…etc), RCInput, safety switch, and can configure ESC ( PWM Normal. DShot,…etc).
The RPI shall take care of camera, wifi and floating point processing of AP.
Sounds like you just want a standard flight controller (FC) with the PI as the “companion computer” (CC). The FC talks to the CC over a serial port using the mavlink protocol. https://ardupilot.org/dev/docs/companion-computers.html
But the IOMCU does NOT support IMUs… and it’s an integral part of the Flight Controller.
Are you planning to design a custom PCB with an STM32 and IMU sensors?
BTW, there’s a good reason the inertial sensor data doesn’t go through the IOMCU.