core: recursive dependency init and runtime Camera/Ethernet clock setup#499
core: recursive dependency init and runtime Camera/Ethernet clock setup#499dani-clo wants to merge 2 commits into
Conversation
e5bb5bf to
731b02d
Compare
Built
|
| Artifact | Board | Core | Tests | RAM | Sketches | Warnings | Errors |
|---|---|---|---|---|---|---|---|
✅* zephyr_contrib |
ek_ra8d1
| 📗 | ✅* |
11.9% |
2 | 2 | - |
frdm_mcxn947
| 7 🏷️ | ✅* |
58.0% |
2 | 2 | - | |
frdm_rw612
| 2 🏷️ | ✅* |
83.0% |
2 | 2 | - | |
✔️* zephyr_main |
giga
| 5 🏷️ | ✅* |
54.7% |
58 | 16 | - |
nano33ble
| 1 🏷️ | ✅* |
78.8% |
30 | 10 | - | |
nano_matter
| 1 🏷️ | ✅* |
|
22 | 8 | - | |
nicla_vision
| 5 🏷️ | ✔️* |
57.0% |
52 | 8 | (10*) | |
niclasense
| 2 🏷️ | ✅* |
|
26 | 12 | - | |
opta
| 5 🏷️ | ✅* |
57.7% |
62 | 18 | - | |
portentac33
| 3 🏷️ | ✔️* |
|
66 | 8 | (8*) | |
portentah7
| 4 🏷️ | ✅* |
58.5% |
74 | 16 | - | |
✅* zephyr_unoq |
unoq
| 📗 | ✅* |
26.9% |
56 | 8 | - |
Legend
Board Test Status description 🔥 🔥 Test run failed to complete. ❌ 🔴 Test completed with unexpected errors. ⁉️ ⁉️ Test was expected to fail but passed; exception entry is outdated. ✔️* 🚫 Test completed with errors, but all are known/expected. ✅* 🟡 Test completed with some warnings; no errors detected. ✅ 🟢 Test passed successfully, with no warnings or errors. 🌑 🌑 Test was skipped.
731b02d to
5a43ea5
Compare
Built
|
| Artifact | Board | Core | Tests | RAM | Sketches | Warnings | Errors |
|---|---|---|---|---|---|---|---|
✅* zephyr_contrib |
ek_ra8d1
| 📗 | ✅* |
11.9% |
2 | 2 | - |
frdm_mcxn947
| 7 🏷️ | ✅* |
58.0% |
2 | 2 | - | |
frdm_rw612
| 2 🏷️ | ✅* |
83.0% |
2 | 2 | - | |
✔️* zephyr_main |
giga
| 5 🏷️ | ✅* |
54.7% |
58 | 16 | - |
nano33ble
| 1 🏷️ | ✅* |
78.8% |
30 | 10 | - | |
nano_matter
| 1 🏷️ | ✅* |
|
22 | 8 | - | |
nicla_vision
| 5 🏷️ | ✔️* |
57.0% |
52 | 8 | (10*) | |
niclasense
| 2 🏷️ | ✅* |
|
26 | 12 | - | |
opta
| 5 🏷️ | ✅* |
57.7% |
62 | 18 | - | |
portentac33
| 3 🏷️ | ✔️* |
|
66 | 8 | (8*) | |
portentah7
| 4 🏷️ | ✅* |
58.5% |
74 | 16 | - | |
✅* zephyr_unoq |
unoq
| 📗 | ✅* |
26.9% |
56 | 8 | - |
Legend
Board Test Status description 🔥 🔥 Test run failed to complete. ❌ 🔴 Test completed with unexpected errors. ⁉️ ⁉️ Test was expected to fail but passed; exception entry is outdated. ✔️* 🚫 Test completed with errors, but all are known/expected. ✅* 🟡 Test completed with some warnings; no errors detected. ✅ 🟢 Test passed successfully, with no warnings or errors. 🌑 🌑 Test was skipped.
|
Looks like a proper fix. Closed out the earlier attempt at trying to defer camera startup, which worked up until the defer init of I2C and PWM... Thanks |
|
On GIGA, I was able to get the camera to read more reliably, by using some of the recovery code that was added to zephyr maybe 7 months ago: Without this on GIGA, I got maybe one frame before it errored and hung. With this it has been running for a while now. |
@KurtE |
|
Update: PortentaH7. in the overlay file, I see that Changed it from FULL to match GIGA... Also wondering about about dmas setting for both. On current source a while ago I had to change As something changed to make it 1 based instead of 0... |
|
Portenta H7: I tried saveral different things and they all failed to do DMA from camera to SDRAM... The fix I mentioned for the zephyr side DCMI works on GIGA, although you still get a reasonable number of DMA errors. I think there may have been another PR later on Zephyr that may have helped earlier. But for a quick and dirty I setup the 0th buffer to use memory returned by Malloc and that works... Quick and dirty sketch from camera to ST7796... Sorry not a great picture, but... @dani-clo do you want this level of information here under the PR? Or should I create a PR to for example update the PortentaH7 overlay/config and another against arduino/zephyr to bring in some of the DCMI stuff? Some of the apps I have been testing things out here are up on my github project: https://github.com/KurtE/Arduino_GIGA-stuff Sketch to output GIGA to display shield: Zephyr_GigaCameraDisplay_GFX |
5a43ea5 to
cb6cdc5
Compare
|
Thanks for the detailed investigation and testing @KurtE ! So, to summarize where we are:
I think these topics are now somewhat independent from the deferred-init/clock scope of this PR. Could you please open separate issues/PRs/discussions for the remaining camera/DMA topics? I’d prefer to keep this PR focused on the deferred-init/clock changes so we can hopefully review and close it in the next few days. |
Built
|
| Artifact | Board | Core | Tests | RAM | Sketches | Warnings | Errors |
|---|---|---|---|---|---|---|---|
✅* zephyr_contrib |
ek_ra8d1
| 📗 | ✅* |
11.9% |
2 | 2 | - |
frdm_mcxn947
| 7 🏷️ | ✅* |
58.0% |
2 | 2 | - | |
frdm_rw612
| 2 🏷️ | ✅* |
83.0% |
2 | 2 | - | |
❌ zephyr_main |
giga
| 5 🏷️ | ✅* |
54.7% |
58 | 16 | - |
nano33ble
| 1 🏷️ | ✅* |
78.8% |
30 | 10 | - | |
nano_matter
| 1 🏷️ | ✅* |
|
22 | 8 | - | |
nicla_vision
| 5 🏷️ | ✔️* |
57.0% |
52 | 8 | (10*) | |
niclasense
| 2 🏷️ | ✅* |
|
26 | 12 | - | |
opta
| 5 🏷️ | ❌ |
57.7% |
62 | 18 | 16 | |
portentac33
| 3 🏷️ | ✔️* |
|
66 | 8 | (8*) | |
portentah7
| 4 🏷️ | ✅* |
58.5% |
74 | 16 | - | |
✅* zephyr_unoq |
unoq
| 📗 | ✅* |
26.9% |
56 | 8 | - |
Legend
Board Test Status description 🔥 🔥 Test run failed to complete. ❌ 🔴 Test completed with unexpected errors. ⁉️ ⁉️ Test was expected to fail but passed; exception entry is outdated. ✔️* 🚫 Test completed with errors, but all are known/expected. ✅* 🟡 Test completed with some warnings; no errors detected. ✅ 🟢 Test passed successfully, with no warnings or errors. 🌑 🌑 Test was skipped.
Caution
zephyr_main is blocked due to failures on opta!
Redid the PR incorporation and tried again. Still not getting anything but now I am also seeing this error: Which is rather strange. EDIT: |
Overlay: Config: Need new PR(s), probably in Arduino/Zephyr, to bring in some of the updates to DCMI and maybe GC2145 code to a) The recovery code I added in to DMA error. |
temporary fix to allow build until PR #499 can be included
|
@dani-clo @pillo79 @pennam Quick question on this: Is Arduino planning to zephyr 4.4 soon? I see there is now an active branch up on Arduino where some PRs have PRs are pending... Should we be testing against that version. EDIT: I tried by editing west.yaml to use the 4.4... west update downloaded it, but builds fail... Guessing I would need the Monza branch of ArduinoCore-zephyr to go that route. |
|
I did create a PR: But if switching soon to 4.4 release of zephyr, than probably should figure out how to get the |
|
Hi Kurt, |
@KurtE As you said with using the fixed buffer (or your malloc mod) I got no images displayed or received from the camera. Just thought I would give an update |
temporary fix to allow build until PR #499 can be included
cb6cdc5 to
24ac780
Compare
Signed-off-by: Daniele Cloralio <d.cloralio@arduino.cc>
Signed-off-by: Daniele Cloralio <d.cloralio@arduino.cc>
24ac780 to
3834591
Compare
Built
|
| Artifact | Board | Core | Tests | RAM | Sketches | Warnings | Errors |
|---|---|---|---|---|---|---|---|
✅* zephyr_contrib |
ek_ra8d1
| 📗 | ✅* |
11.9% |
2 | 2 | - |
frdm_mcxn947
| 7 🏷️ | ✅* |
58.0% |
2 | 2 | - | |
frdm_rw612
| 2 🏷️ | ✅* |
83.0% |
2 | 2 | - | |
✔️* zephyr_main |
giga
| 5 🏷️ | ✅* |
54.7% |
58 | 16 | - |
nano33ble
| 1 🏷️ | ✅* |
78.8% |
30 | 10 | - | |
nano_matter
| 1 🏷️ | ✅* |
|
22 | 8 | - | |
nicla_vision
| 5 🏷️ | ✔️* |
57.0% |
52 | 8 | (10*) | |
niclasense
| 2 🏷️ | ✅* |
|
18 | 12 | - | |
opta
| 5 🏷️ | ✅* |
57.7% |
62 | 18 | - | |
portentac33
| 3 🏷️ | ✔️* |
|
66 | 8 | (8*) | |
portentah7
| 4 🏷️ | ✅* |
58.5% |
74 | 16 | - | |
✅* zephyr_unoq |
unoq
| 📗 | ✅* |
26.9% |
56 | 8 | - |
Legend
Board Test Status description 🔥 🔥 Test run failed to complete. ❌ 🔴 Test completed with unexpected errors. ⁉️ ⁉️ Test was expected to fail but passed; exception entry is outdated. ✔️* 🚫 Test completed with errors, but all are known/expected. ✅* 🟡 Test completed with some warnings; no errors detected. ✅ 🟢 Test passed successfully, with no warnings or errors. 🌑 🌑 Test was skipped.
|
Memory usage change @ 3834591
Click for full report table
Click for full report CSV |


This improves the current deferred-init initialization process.
Add recursive initialization of required device dependencies before initializing the target deferred-init device itself.
Complete the runtime bring-up for Camera and Ethernet, including deferred pwm-clock initialization, replacing the previous behavior where the external clock was always enabled even when Camera/Ethernet were not in use.