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

[BUG] CSI2-RX does not work after having deinitialized and initialized #213

Open
trunghieulenxp opened this issue Oct 10, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@trunghieulenxp
Copy link
Contributor

trunghieulenxp commented Oct 10, 2024

Describe the bug

To Reproduce
After having called function in fsl_mipi_csi2rx.c void CSI2RX_Deinit(MIPI_CSI2RX_Type *base) (

void CSI2RX_Deinit(MIPI_CSI2RX_Type *base)
)

and when we call again the function void CSI2RX_Init(MIPI_CSI2RX_Type *base, const csi2rx_config_t *config) (

void CSI2RX_Init(MIPI_CSI2RX_Type *base, const csi2rx_config_t *config)
)

The module is halted completely. We have inspected the code, and we found that by removing:
MIPI_CSI2RX_SoftwareReset(base, true) (

MIPI_CSI2RX_SoftwareReset(base, true);
)

We can deinit and init the module without problem. However, this is just a workaround.

  • Environment (please complete the following information):
    • Tag/Commit hash: 6958175
    • Toolchain:
    • Board/SoC: IMXRT 1170 EVKB
    • Example: samples/video/capture (zephyr os)
@trunghieulenxp trunghieulenxp added the bug Something isn't working label Oct 10, 2024
@trunghieulenxp
Copy link
Contributor Author

@zejiang0jason Can you take a look at this issue please ?

@zejiang0jason
Copy link
Contributor

Hi @trunghieulenxp , thanks for report, can you access the SDK 2.16 package? I tried with the csi_mipi_rgb project, modify the code here
https://github.com/nxp-mcuxpresso/mcux-sdk-examples/blob/fc18ff0c12ba90fe71714eaa4244717efa18c61c/evkbmimxrt1170/driver_examples/csi/mipi_rgb/cm7/camera_support.c#L242

to

    CSI2RX_Deinit(MIPI_CSI2RX);
    CSI2RX_Init(MIPI_CSI2RX, &csi2rxConfig);

but didn't reproduce.

@trunghieulenxp
Copy link
Contributor Author

trunghieulenxp commented Oct 11, 2024

Hi Jason, thanks for your answer, this error only appeared on the second time you do which means you need to call:
CSI2RX_Init(MIPI_CSI2RX, &csi2rxConfig)
to start, and leave it work for at least one frame and then call:
CSI2RX_Deinit(MIPI_CSI2RX);
to stop the process.

After that you call again:
CSI2RX_Init(MIPI_CSI2RX, &csi2rxConfig)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants