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 and I2C

Other Parts Discussed in Thread: CC2541, CC2540, CC2541DK-MINI, CC2541S

Hi,

I have been reading the available posts on CC2541 and I2C usage and although there is very useful information available on the forum related to this topic, there are a few points that I am still unsure about.

Let me first try to explain what I am aiming to achieve o give the bigger picture.

I would like to use a few CC2541 based development kits (mini or otherwise) and connect them to one another via the I2C bus as slaves. There will be another MCU ( a non-TI part on an independent standalone platform) that will also be connected to the same I2C bus as the only master. This master will poll the CC2541 slaves at regular intervals to query some information.

I would also like to connect to the CC2541 slaves for debugging and breakpointing purposes. As I understand, the debugging tool (CC Debugger) also uses the I2C bus on CC2541 since it does not have a USB port (unlike the CC2540 part). Ideally, I would like to be able to debug the slaves while the master polls them regularly but I think this will cause arbitration and collision problems on the I2C bus. Therefore, I will have to compromise and use the I2C bus EITHER for polling and information exchange between the CC2541 slaves and the master MCU OR for debugging a CC2541 slave devices. This compromise (thankfully) is not an issue in my application and I can live with it.

Based on the above scene, following are my questions:

1 - Does the CC2541 Mini development kit (i.e. CC2541DK-MINI) route the I2C pins to an accessible header at all so that I can interconnect multiple mini CC2541s via the I2C and the master MCU I mentioned above?

2 - Another alternative is to buy CC2541EMK and a few SmartRF05EB.boards to plug the CC2541 Evaluation Modules (CC2541EM) into. I presume I can use the CC Debugger in this set up still for debugging purposes. Does the SmartRF05EB provide easy access to the I2C pins of the CC2541 so that I can wire multiple slaves and a master together to share the same I2C bus?

3 - Given the objectives I have described above, which development platform do you think I should go for? Obviously the cheaper option is generally preferred but I will need to develop my own application and show that it is working as needed at the end of the day, which is priceless!

3 - Are there any potential limitation/problems with the I2C connectivity I am trying to achieve here? Do you think it is achievable or do you see potential problems with the set up I have in mind?

4 - What is the maximum speed I can push the I2C on a CC2541 device? Is 400 kbps easily achievable?

Your feedback will be greatly appreciated on the above.

Regards...

  • CC2541DK-MINI is enough for I2C connection. The SCL and SDA are located on additional testpins ( pin2 and pin4 of "TEST STL21"). You can connect your host I2C to these two pins. As for I2C speed, Standard mode up to 100-kbps and fast mode up to 400-kbps support. Chapter 20 of swru191 can give you a clear picture of I2C.

  • Hi YiKai,

    Thank you for your response. Does the Mini DK allow user developed application to be flashed to the CC2541 device? I am worried that it may not be as flexible as the DK when it comes to developing my own application and debugging it.

    Your feedback on this will be greatly apprecieated.

    Regards...

  • Hi Cryptoman,

    Yes, you might flash whatever you like onto the CC2541 in the MiniDK but you will need to use IAR to create your software.

    Regards,
    Svend 

  • Of course, CC2541DK-MINI can be used for development. You don't need to worry about that.

  • It's good to know that the Mini SDK will do the job for me.

    I have one more question on the Mini SDK in that case. Does it come with the 256 kB or the 128 kB CC2541 part? Funny enough I asked this question to one of the well known distributors earlier this week but they could not respond!! They did not have the answer for the CC2540 Mini DK either.

    Regards...

  • The one I have here in my office is 256kb at least :)

    Regards,
    Svend 

  • At least 256 kB :) :) That is clear enough. I wish TI included this critical information on the associated product sheets. It is such an obvious thing to do!

    Thanks sven.

  • Hi Svend,

    Since you have a CC2541 mini DK on your desk, you may be able to tell me a bit about the IOs of the mini kit, if you don't mind. I had a look at the the following documentation but IO details were not included there: http://www.ti.com/lit/ug/swru332a/swru332a.pdf

    1 - Which IOs of the CC2541 can be accessed by the user on the mini DK easily? I mean there must be some GPIOs that the user can access for controlling simple external logic devices.

    2 - I presume all the external GPIOs use 3.3V. Is that correct?

    3 - The Mini kit ONLY works with a coin cell battery, does it? It cannot be powered via USB or the CC Debugger. Is that correct? (in which case I must have a few coin cell batteries in stock dueing long hours of code debugging! )

    Your help and support will be greatly appreciated.

    Regards..

    .

  • Hi,

    1: You can find the schematic http://www.ti.com/tool/cc2541keyfob-rd . It is linked to from the MiniDK web page :)

    2: Yes, that is correct.

    3: You can power it through the debugger by connecting pin 2 and 9 on the debugger header (VDD_TARGET and +3V). This will power the level shifters inside the debugger for the signals going back to the debugger as well as the mini DK with the 3V regulator inside the debugger. 

    The simplest thing to do is to open the debugger and solder on a wire between those pins, see attached picture. However, this is done on your own responsibility as you modify the kit.

  • Hi Svend,

    Reference design document, of course !! :) :) How did I miss that? Thank you so much for the link. The answer is right below. A whopping 7 GPIOs at my disposal. Couldn't ask for more from such a small (but mighty) dev kit. Great stuff!

    The power option you have mentioned is also mentioned in that reference document. One important footnote has also been included which the readers of this thread should remember and I am including it here:

    "The coin cell battery on the key fob MUST be removed if the pin 2 and the pin 9 shorting option is used for external powering."

    Also, for those who do not wish to open the CC Debugger box to make the above mod, I suggest they make the cross wiring you have mentioned on the small external adapter card that comes with the kit. That may be a safer alternative. The required solder pads look easily accessible.

    Thank you once again for your extremely helpful post.

    Regards...

  • Hi Cryptoman,

    If you want to supply the CC2541 Keyfob with the CC Debugger, simply remove the coin cell battery and put a short across the 2 pin header near the LED. You will not need to short pins 2 and 9 on the CC Debugger.

  • Hi Chatto,

    Well, I must admit your suggestions beats mine. It is a much cleaner way to do this.

    Thank you so much for that input.

    Regards...