@Merlin513 @ptillisch,
Sorry again, I know that the Zephyr board releases are marked as Beta, but I am also most of the time working on the Bleeding Edge of it.
That is with current sources, which I know the risks of doing so. But I also know that if I am trying to contribute new stuff it needs to be tested with current sources and it is probably a good thing to find potential issues and if appropriate resolved before a new release comes out.
Like the current code on the GIGA for using a Camera is broken.
GIGA/Portenta H7 - Camera code with the new deferred init setup... · Issue #491 · arduino/ArduinoCore-zephyr
Two (or Three) main issues.
a) Camera (GC2145) is not marked as defer-init, but the I2C object above it is. And as mentioned in the fix to get the Giga Touch controller to work again, the fix does not scale.
b) If the Camera itself has to be defer-init There is no easy handle in the current code to get it. Also unclear if the DCMI object can startup if the object that it is going to interact with is...
c) PWM pins - The timers and the like are marked as defer-init, the pwmclock is not, but even more than this with the GC2145 object, the Timer pins are not setup for default pin control:
&timers1 {
status = "okay";
st,prescaler = <0>;
pwm1: pwm {
status = "okay";
zephyr,deferred-init;
pinctrl-0 = <>;
pinctrl-1 = <>;
pinctrl-2 = <&tim1_ch3_pj9 &tim1_ch1_pk1 &tim1_ch2_pj11>;
pinctrl-names = "default", "sleep", "arduino";
};
};
How does one work with that setup? First several attempts failed. I have a hack in now in my test sketch:
analogWrite(57, 64);
And then allow my startup code to still work, however I need to ignore the return code
if ((ret = zephyr::arduino::init_dev_apply_pinctrl(camera_sensor)) != 0) {
Note: for most of this stuff, I earlier tried to make all of the camera stuff to be defer-init, now trying to update that PR (again)?
camera: try to defer init of video objects by KurtE · Pull Request #195 · arduino/ArduinoCore-zephyr
But at least with all of this hacking, I at least have an image up again on the display:
Note: the camera is plugged into the shield through an adapter board I long time ago, to rotate 90 degrees, using it here as I also have connector on the back of it, to allow camera to point the other way, but it allowed me to connect up Logic Analyzer.
Now back to playing (or seeing what else I can break) 