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.

CC2541 I2C Slave problem

Other Parts Discussed in Thread: CC2541

Hello,

I've been trying to connect the CC2541 Keyfob using I2C to a BeagleBone Black board but I have problems with data transmission. I'm using the I2C drivers found in the CC2541EB category with the SimpleBLEPeripheral project. I'm checking for a connection through running the i2cdetect tool every few seconds to probe for the device.

So far I've checked that my configuration for slave mode is consistent with nothing changing it through CSPY dump and can confirmed that data is flowing through the SDA line wires as well as the SCL line on both ends but I can't seem to get any of the data on the CC2541's end in the I2CDATA register nor can I trigger the polling interrupt routine. I've established a common ground between the CC2541 and the Beaglebone for the I2C as well and I've also tried lowering the Beaglebone's I2C clock rate to a 100 for standard communication but the CC2541 still fails to detect any data.

I was wondering if there's anything in the program that I have to set aside from calling the HalI2CInit() function to enable data detection/flow?


Thanks and Regards,


Noct

  • Hi,

    The best example I can point you to for i2c is the SensorTag project. Can you take a look at that reference project? Perhaps someone who has used beaglebone in this manner can also comment.

    Best wishes
  • Hello JXS,

    I tried using the SensorTag project as an example along with the I2C drivers and was able to configure it as a master. In master mode the read/write seems to work but I don't have any devices to hook it up to so it returns with the status 0x20 which I can see as being data sent but no ACK received. I tried to scan the pins using an oscilloscope on pins 2 & 4 but there doesn't seem to be any clock/data flow coming out of the pins.

    I'm not sure if I've configured the pins correctly and I'm not entirely sure what else to check within my project configurations. As far as I've explored, in the board_cfg.h I haven't enabled SPI or UART so there shouldn't be any modifications of the pins. I've disabled the pin modifications in simpleBLEPeripheral.c as well. If anyone who's been through the same problems I have could give me some pointers that'd be great thanks.

    Regards,

    Noct

  • After some debugging it turns out I can't seem to set my I2CDATA register with the data to send in master mode. I also seem to be having problems viewing the registers in quick watch as well whenever I use the registers in an area of my user program. I'm starting to think that there maybe memory mapping issues perhaps due to conflicting definitions. Has anyone had this type of problem before with the same or a similar device?

    Regards,

    Noct