This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320DM8127: IPNC_RDK using AR0331 3Mp sensor, changed 10Mhz crystal to 27Mhz - where to make change in code?

Part Number: TMS320DM8127

Hello,

In order to get a higher frame rate, we've changed the input clock for the AR0331 sensor - crystal from 10Mhz to 27Mhz.

I'm looking all over the IPNC_RDK code (v3.8.0) for the place to change the pixel clock from 10Mhz to 27Mhz.

I'd appreciate any ideas.

Thanks,

Mechi

  • Hi Mechi Fendel,

    How is the clock provided to the AR0331 ? Please refer AR0331 and change the register values in the file ipnc_rdk/av_capture/framework/drv/usermod/src/imgs_AR0330_3.1MP/drv_imgs_AR0330_REG.h, accordingly.
  • issdrv_ar0331Priv.h

    Hi Dwarakesh,

     >> How is the clock provided to the AR0331 ?

    That's exactly my question.

    The file and the path do not exist in my IPNC_RDK_3.8.0.

    I found in a file a reference to the clock - but it isn't used in any of the other source files. ISS_AR0331_XTAL_KHZ

    Still searching...

    Thanks for any help.

    Mechi

  • Hi Mechi,

    Ignore the previous file. It is for different hardware DM36x. What is the hardware being used: Custom or EVM ? Check the schematics if custom hardware for the source of clock.

  • DM8127 - clock source was changed from 10Mhz to 27Mhz crystal - on our custom proprietary board.
    Now I have to change in the code - for I2C_2 - channel that reads pixels and frame data from the sensor - to reflect the HW change.
    I've been searching and still haven't found the correct place to define it.
  • You can access Source/ti_tools/iss_03_80_00_00/packages/ti/psp/devices/ar0331/src/issdrv_ar0331Api.c ? Please check the example usage there:

    #define OUT_CLK ((INPUT_CLK * PLL_M) / (PLL_pre_div * PLL_P1 * PLL_P2) )    // 74.25MHz

    Output clock depends on the data lanes and the fps etc. Check the AR0331 datasheet for the desired output clock. With input clock as 27MHz,you need to calculate the remaining values in the above equation. It is not straight forward of changing a single MACRO.

  • Yes - by me these rows are commented out. I've used the OnSemi wizard to set the correct register timing values.
    I'm able to set/read registers of the AR0331 sensor.
    Just no frames are being captured...
    Thanks - I'm still searching...
  • What is the sensor configuration you have used ? Is the ISS configured to receive the same configuration as sensor ? What is the usecase pipeline ? Did you probe for vsync using scope to find if sensor is giving at desired frame rate ?
  • Until now I've used the AR0331 sensor and received 15 FPS in HDR mode with the 10Mhz crystal.
    Everything worked well - beautiful video, etc.
    The only thing that was changed was the crystal - to 27Mhz. I changed some of the sensor register values using the wizard from OnSemi.
    The same code that runs with video with the 10Mhz crystal doesn't produce frames with the 27Mhz crystal. Since the only change is the crystal, I'm looking for somewhere in the ISS or ISP that uses PIX_CLK or INPUT_CLK or something to change.
  • AFAIK, change in input clk for sensor, is not required to be set at ISS. Yes, pixel clock settings could change if the data rate is changed(both change in resolution and in frame rate). I am not able to find a particular settings for pixel clock input, but let me cross verify. Can you tell me the change in resolution and frame rate tried out with the new 27MHz frequency ? Also Vsync and Hsync(assuming parallel interface), should be generated and should be coming till the ISS of DM814x, even if ISS is configured wrongly(if the sensor is powered and programmed). Are you able to probe them through scope and confirm if they are present ?
  • Thanks for all of your answers.

    I was able to see VSYNC and HSYNC - so that's good - the sensor is definitely outputting frames. According to the VSYNC it's outputting about 25fps.

    I've attached the OnSemi wizard for the sensor - and the sensor definitions that I'm using.

    I will try to lower the PLL and see if there's a difference. I did try to lower the resolution, but didn't succeed in getting any frames.

  • Good to hear. I would suggest you to start trying the same resolution and frame rate as that of 10MHz, as it was working for the given ISS configuration.
  • It worked!
    I tried lowered the PLL multiplier from 0x42 to 0x30 and i started getting frames - @ 18fps!
    The problem was that there was too much too fast and the ISS couldn't capture - or something like that.
    Thanks for all your suggestions and help.
  • Good to hear it is working. But 25fps is not too fast for DM81xx, until the resolution is 4K or complex pipeline. Anyway, you can program the same in ISS driver file, instead of Wizard and check.
  • I can't seem to get more than 15fps. It was explained that in HDR mode, 15 fps is really 30fps - since every 2 frames is combined to 1 HDR image.
    But this is fine for now.
    Thanks.
  • Oh I missed to note it to be HDR. That explains. Thanks. Please close this thread.