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.

Complete firmware libraries for the CC2530 and CC2531?

Other Parts Discussed in Thread: CC2531, CC2530, SIMPLICITI, Z-STACK

All,

I am frustrated with the organization of the CC2530 and CC2531 firmware libraries. They seem to be designed only for the application examples provided in the package, and not for general code development that use the code examples. For example, just to make an LED blink on a CC2531 dongle, I find myself adding all kinds of new files with USB support, etc. All I want to do is use the libraries to blink an LED, yet the include dependencies in the firmware libraries seem to drill endlessly into supporting every feature possible with the hardware. Am I doing something wrong? Is there another "library package" that I should be using? Do I need to write my own libraries and headers to get away from this problem?

Secondly, the CC2531 uses MRFI libraries for radio communications, but the CC2530 uses basic_rf. If you use the library for the CC2531, it doesn't even include directories for basic_rf components, and if you use the CC2530, there is no included files for MRFI. Once again, shouldn't there just be a library directory structure where developers can add what they need? Both chips should support the same radio functionality. Am I missing something here?

  • I would like to clarify my previous post after looking into it a bit further. I am working on a product that will use the CC2530 and CC2531 SoCs. I bought the development kits, and have two cc2530 eval boards, and one cc2531 USB dongle. Most of my development right now is on the USB dongle, but in some cases, I don't need USB functionality, so I will use the cc2530. I am not using TI's protocols like simpliciTI or Z-stack.

    As I am writing the firmware for this product, I am seeing that pieces of the firmware support libraries are scattered all over the place in different TI packages. Basic_rf libraries in the CC2530 example code package, timer functions in another, flash controller abstraction in another, etc.

    This is a real issue because as I try to merge different parts from different example application packages, I run into major headaches. For example, I had all my code working, and realized I needed to save some data in non-volatile memory using the flash controller. After reading the user guide, I searched online and found that the z-stack libraries for the cc2530 have some abstraction libs in files called hal_flash.h and hal_flash.c. So, I added these to my project, merged them in, then found that some of the files are redundant and conflicting with files that were already part of my project.

    So, does there exist a general firmware library package that I can download and have access to all these firmware libs? I'm tired of trying to piece this together only to run into new issues every time I add functionality. In my opinion, there should be a zip file of all the libs, organized neatly, so that if you need functionality, you can include the appropriate files and use the functionality without ad hoc merging of files. This would really make development a whole lot easier.

     

  • I second this request to a T.

    I am new to the world of CC25xx, coming from previous work with AVRs, and the lack of clear-cut documentation for the use of the libraries outside of the examples is frustrating. If the aforementioned zip could be provided, or a link to them if they exist, it would be greatly appreciated.

    Thanks.

  • No response from TI employees on this?

  • Hi Doughy

    I started to develop CC2530 and I'm having the same problems as yours.

    I wonder if you already found the fix of it.

     

     

    Best Regards

    Roger

  • Roger,

    No, I never did find a solution to this problem. The TI libraries are extremely bloated and disorganized. You have to download parts of them from different places, and they don't play nice together. TI tries to make the code compatible across multiple chips, compilers, and architectures, so the result is very unreadable and confusing code. You have to set up all kinds of stuff in the compiler settings, and the code has bugs in it. It's a total mess and headache.

    I got so fed up with the libraries, I decided to write all of my code from scratch, going through the CC253X user guide in every detail. The user guide is actually very well written, which makes it even more surprising that TI hasn't done a better job with their libs. After doing the work for myself and abandoning the TI libraries, my code is much more stable and readable. If you need help with a particular aspect of the chip I might be able to help by providing parts of my code.

  • Thanks Doughy

    I want to work with the sleep mode PM2. I read the Datasheet and it explains well how to work with it, so I tried to find a library that contains the PM2 but the only mode that I found in Software Examples libraries was the Idle mode.

     

  • Sorry, I haven't used the PM2 mode, so I don't have any code. You might try writing your own functions based on the user guide. By the time you find some TI code that works like you want it to, you'll be done with your own functions and there won't be any surprises. 

  • Oh, that's OK thanks for the help anyway. :)

     

    Regards.