Quantcast
Channel: Cypress Semiconductor - PSoC 4 BLE
Viewing all articles
Browse latest Browse all 726

I2c_BUS_BUSY

$
0
0
Forums: 

Hi everyone,

 

i've been trying to read an EEProm over the I2c bus using a psoc4 BLE prototyping board.
no matter what i do i keep getting the i2c_bus_busy status.

The SCL and SDA lines are connected to the 5v line with a  pair of 3,3kOhm resistors.
using this setup with, for example a raspberry pi does net results.

void i2cRead(int device,int memory, int length){
    
    SCB2_I2CMasterWriteBuf(device, (uint8*) memory, 1,SCB2_I2C_MODE_NO_STOP);
    status = SCB2_I2CMasterSendStart(device, SCB2_I2C_MODE_REPEAT_START);
    /* Check if transfer completed without errors */   
    if(status == SCB2_I2C_MSTR_NO_ERROR ){   
        /* Read array of length bytes */  
        uint8_t i = 0;
        for(i=0; i<length; i++){            
                rdBuf[i] = SCB2_I2CMasterReadByte(SCB2_I2C_MODE_REPEAT_START);       
    }
    SCB2_I2CMasterSendStop();    /* Send Stop */
    //memset(rdBuf,0,128);
    }
}

i'm stumped as to why this doesn't work, anyone have an idea?

 

 


Viewing all articles
Browse latest Browse all 726

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>