Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > Using the FX3 with Omnivision Camerachip- How can the i2c "ACK" bit be ignored?

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Using the FX3 with Omnivision Camerachip- How can the i2c "ACK" bit be ignored?
Moderator:
RSKV

Post Reply
Follow this topic



Using the FX3 with Omnivision Camerachip- How can the i2c "ACK" bit be ignored?

logicland posted on 07 Aug 2012 4:33 AM PST
Member
9 Forum Posts

Currently developing a UVC Camera system using Omnivison Camerachips.

Omnivison use their SCCB 2-wire interface which unfortunately does not privide an ACK bit for the 9th bit, instead the bit is identified as "Don't Care"

Is there a workaround to force the API firmware to ignore the ACK bit?

 

 

 

 




Re: Using the FX3 with Omnivision Camerachip- How can the i2c "ACK" bit be ignored?

RSKV posted on 14 Aug 2012 03:42 AM PST
Cypress Employee
848 Forum Posts

 If that is the case then I think it is better to implement I2C using two GPIOs (bit banging).

 



Re: Using the FX3 with Omnivision Camerachip- How can the i2c "ACK" bit be ignored?

ranbu posted on 24 Sep 2012 06:16 AM PST

1 Forum Post

Can you update the SDK so that it supports the Omnivision SCCB interface ?... We really dont want to do the old fashioned I2C bitbanging !      OR can you include a parameter in the I2C API's to ignore the ACK ?

 



Re: Using the FX3 with Omnivision Camerachip- How can the i2c "ACK" bit be ignored?

ramuuu posted on 01 Oct 2012 11:16 PM PST
Senior Member
12 Forum Posts

Hi Logicland,

Have u been able to get the SCCB bit-banging code to successfully work with ur Omnivision camera? We are not...pls share the code if u got success. We are using OV9650 camera.

Thanks,

sriraam

 



Re: Using the FX3 with Omnivision Camerachip- How can the i2c "ACK" bit be ignored?

logicland posted on 02 Oct 2012 09:37 AM PST
Member
9 Forum Posts

After hooking up an OmniVision OV5620 to test the comms we found it worked OK, just like any other I2C device.

 

Anyway here is the code:-

/* Functions for OmniVision Chips */
void sccb_read_reg(uint8_t reg, uint8_t *data)
{
    CyU3PReturnStatus_t apiRetStatus;
    CyU3PI2cPreamble_t preamble;
    preamble.buffer[0] = 0x60;
    preamble.buffer[1] = reg;
    preamble.buffer[2] = 0x61;
    preamble.length = 3;
    preamble.ctrlMask = 1 << 1;
    apiRetStatus = CyU3PI2cReceiveBytes(&preamble, data, 1, 0);
    if(apiRetStatus != CY_U3P_SUCCESS){
        CyU3PDebugPrint(8, "i2c Receive Failed, Error Code = %d\n\r", apiRetStatus);
    }else{
        CyU3PDebugPrint(8, "i2c Receive Data = %x,%x\n\r", reg, *data);
    }
}

void sccb_write_reg(uint8_t reg, uint8_t *data)
{
    CyU3PReturnStatus_t apiRetStatus;
    CyU3PI2cPreamble_t preamble;
    preamble.buffer[0] = 0x60;
    preamble.buffer[1] = reg;
    preamble.length = 2;
    preamble.ctrlMask = 0 << 2;
    apiRetStatus = CyU3PI2cTransmitBytes(&preamble, data, 1, 0);
    if(apiRetStatus != CY_U3P_SUCCESS){

        CyU3PDebugPrint(8, "i2c Send Failed, Error Code = %d\n\r", apiRetStatus);
    }else{
        CyU3PDebugPrint(8, "i2c Send Data = %x,%x\n\r", reg, *data);
    }
}



Re: Using the FX3 with Omnivision Camerachip- How can the i2c "ACK" bit be ignored?

RSKV posted on 04 Oct 2012 11:30 PM PST
Cypress Employee
848 Forum Posts

Actually I2C source file is opened in the SDKv1.2.

So I think you should be able to modify the I2C APIs according to your requirement. Please let me know if it is not possible.

Thanks,

sai krishna.



Re: Using the FX3 with Omnivision Camerachip- How can the i2c "ACK" bit be ignored?

ramuuu posted on 05 Oct 2012 02:55 AM PST
Senior Member
12 Forum Posts

Hi Logicland,

Thanks for your code snippet. Fortunately our bit banging code also worked after debugging.

 

Hi Saikrishna,

Thanks for your reply.  I dont find any 'C' source file for I2C API's in the following SDK 1.2 instalation location:

C:\Cypress\EZ-USB FX3 SDK\1.2

Regds,

Sriraam



Re: Using the FX3 with Omnivision Camerachip- How can the i2c "ACK" bit be ignored?

RSKV posted on 07 Oct 2012 08:09 AM PST
Cypress Employee
848 Forum Posts

Hi Sriram,

In the SDK installation files, look for lpp_source folder in firmware folder.

You can find the i2c code in cyu3i2c.c file.

Please let me know if you face any trouble in finding it.

Thanks,

sai krishna.



Re: Using the FX3 with Omnivision Camerachip- How can the i2c "ACK" bit be ignored?

ramuuu posted on 17 Oct 2012 11:32 PM PST
Senior Member
12 Forum Posts

Thanks Krishna...we found it in the path you specified.

Rgds, Sriraam






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20