RT1050 CSI Inactive

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RT1050 CSI Inactive

Jump to solution
2,008 Views
variable_andrew
Senior Contributor I

Basing code off of AN12110, I have code in place to start the CSI and am expecting some data, but despite data coming from my camera (via parallel interface) CSI seems to be dead - my code is stuck at:

while (kStatus_Success != CAMERA_RECEIVER_GetFullBuffer(&cameraReceiver, (uint32_t *) &(csiFrameBuf[i]) )) { }

Diving further in shows that:

status_t CSI_TransferGetFullBuffer(CSI_Type *base, csi_handle_t *handle, uint32_t *frameBuffer)
{   
   uint32_t csicr1;

   /* No full frame buffer. */
   if (handle->queueUserReadIdx == handle->queueDrvWriteIdx)
   {
   return kStatus_CSI_NoFullBuffer;
   }

is returning because of NoFullBuffer (even tho the Logic Analyzer is showing FV, LV (HSYNC), and data pins are all providing data to the CSI Parallel pins.

I thought this issue might be similar: i.MX6 SoloX Parallel CSI Problem 

But in my case - I do see the CSICR1 have the reset value of 0x40000800
BUUUT, CSI_Init from the MCUXpresso SDK doesn't seem to be overwriting that value. In fsl_csi.c, line 232, it tries to set base->CSICR1 = 0x40020912, but the debugger doesn't show any change in memory at that address (still at the reset value after single stepping over it). 

 I also am not using PXP or Camera interface. Like the issue I linked to above, do I need to enable these interfaces to somehow enable the CSI to function?

Why else would the CSI not seem to activate?

Labels (1)
Tags (2)
1 Solution
1,844 Views
variable_andrew
Senior Contributor I

The issue was actually that we had an RT1051 on an RT1052 board. 
Now base->CSICR1 is updating according to code, thanks. 

Also - just for posterity - yes I'm using the latest SDK. 

Thanks

View solution in original post

4 Replies
1,845 Views
variable_andrew
Senior Contributor I

The issue was actually that we had an RT1051 on an RT1052 board. 
Now base->CSICR1 is updating according to code, thanks. 

Also - just for posterity - yes I'm using the latest SDK. 

Thanks

1,844 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi variable_andrew ,

  What's the board you are using? The NXP MIMXRT1050-EVKB board?

   Do you try to connect the MT9M114 image sensor to the camera interface, and run the AN12110SW directly?

  Whether you still have problems or not?

Have a great day,
Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply
1,844 Views
variable_andrew
Senior Contributor I

Hi kerryzhou‌ ,

======================= EDIT ========================

I think we found something in hardware - let me clarify that and get back to you. 

=========== Original post below - hold off for now ============

I'm using a custom board (the next revision of our board. The last board was an RT1020 custom board that used FlexIO w/ our camera chip and was working, but not fast enough for what we need, so we're on the RT1050 w/ CSI now). As such, can't run the appnote SW as-is. 

As noted - I can see clock and data coming over the signals INTO the CSI pins, but that might be irrelevant as it seems that I can't even initialize the CSI? See above - writes to even set up the CSI (CSICR1) seem to be ignored?

Anyhow - here are the pin connections:

Screen Shot 2020-01-06 at 9.59.47 AM.png

Screen Shot 2020-01-06 at 9.59.11 AM.png

Signal Analyzer showing data coming in - you can see:

PXCLK is active (1st row), 

Frame Valid goes high (2nd row),

HSYNC/LV valid (3rd row)

data OK :

Screen Shot 2020-01-06 at 10.03.44 AM.png

0 Kudos
Reply
1,844 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi variable_andrew,

  Which MCUXPresso IDE version you are using? Do you try the newest MCUXpresso IDE?

  In my memory, some version MCUXpresso IDE check the variable have problems.

   I use the IAR test the SDK CSI project, the CSICR1 can be modified, so do you also test the SDK CSI code with the newest MCUXpresso IDE or other IDE?

pastedImage_1.png

 

Have a great day,
Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------