Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSI2 retention problem in standby mode #1009

Open
isztldav opened this issue May 8, 2024 · 2 comments
Open

CSI2 retention problem in standby mode #1009

isztldav opened this issue May 8, 2024 · 2 comments
Assignees

Comments

@isztldav
Copy link
Contributor

isztldav commented May 8, 2024

Board: devkit max78002

In short:
I took the provided CSI2 example, implemented "standby mode", and added the call to int mipi_camera_sleep(int sleep).
While the wake/sleep cycle seems to work well, the camera capture will throw errors and after some time suddenly work (for one frame).

Source code:
I just changed the main file: main.zip
basically adding static void _go_to_sleep(void) and static void _setup_btn_wake(void).

Image:
Screenshot from 2024-05-08 09-26-58

Thank you for your help!

@Jake-Carter Jake-Carter self-assigned this May 9, 2024
@Jake-Carter
Copy link
Contributor

Jake-Carter commented May 13, 2024

Thanks @isztldav - I've been able to replicate the issue. This is reminiscent of some deep-rooted timing issues in our CSI hardware I've dealt with in the past. I hadn't tested captures from STANDBY.

There also seems to be some issues with the sleep functions specific to the OV5640 drivers. If I remove the mipi_camera_sleep calls I can get things working in Sleep Mode and Low Power Mode, which leave the peripherals fully powered on. I think we need to re-examine our sleep mode functions for the camera too.

Micro-Power Mode (UPM) fails with the same random CTRL error flags. That mode actually puts the peripherals in state retention, so there seems to be some core issue with the state retention logic for the CSI2 peripheral in general.

@isztldav
Copy link
Contributor Author

Thank you for confirming this. For now my best workaround is to spam the capture function until magically one frame is transmitted from the camera.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants