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

I2C keeps waiting for one byte transfer completion #40

Open
chunkitmax opened this issue Jun 9, 2016 · 0 comments
Open

I2C keeps waiting for one byte transfer completion #40

chunkitmax opened this issue Jun 9, 2016 · 0 comments

Comments

@chunkitmax
Copy link
Member

// Wait until data is received
while (!GET_BIT(MEM_MAPS[m_module]->S, I2C_S_IICIF_SHIFT))
{
    if (GET_BIT(MEM_MAPS[m_module]->SMB, I2C_SMB_SLTF_SHIFT))
    {
        LOG_DL("i2c scl timeout");
        return false;
    }
}

The interrupt flag in I2C status register was 0. The if statement was false.
The I2C interrupt enable flag in I2C control register 1 was found being 0.

Trying to simply set the I2C interrupt flag to 1 if it is 0 to fix this problem.

@chunkitmax chunkitmax added this to the happy-birthday-cupcake milestone Jun 9, 2016
@chunkitmax chunkitmax self-assigned this Jun 9, 2016
@chunkitmax chunkitmax removed their assignment Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant