How to develop CC2530

HI, everyone.

Now, I am developing CC2530.

But I don't know how to develop CC2530.

Firstly, I prepared ZStack for CC2530 and IAR EW8051.

I download ZStack and installed.

After that, I opened sample file of ZStack using EW8051.

There are many folders.

I would like to know how to custmize sample file for CC2530.

And I would like to know that I should develop folders and files.

Here I create the system that consists of coordinator and end devices.

I am a beginner of micro controller.

Please tell us kindly.

Best regards, 

27 Replies

  • Hi Kami,

     

    Inside the sample project (i.e GenericApp) there is a "source" folder.

    Inside this folder there are 3 files "GenericApp.c", "GenericApp.h" and "OSAL_GenericApp.c"

    As a first step try to understand "GenericApp.c " and "GenericApp.h", you'll be probably basing

    your application by changing some content in this files.

    The rest of the files and folders in the project are not of an interest to you at this moment.

    In addition you have to get familiar with couple of APIs, like HAL_API and OSAL_API, which will

    help you in further development (you can find these pdf file in Z-stack installation folder/Documents).

     

    Br,

    Igor

     

    Br,
    Igor.

    Thank you for marking the thread as answered if your question was answered :)

  • In reply to Igor Sherer:

    Hi Igor.

    Thank you for your reply.

    What is the different of coordionator and end device for program?

    Is it written in GenericApp.c ?

    Best regards,

    kami

     

  • In reply to kami:

    Hi Kami,

     

    There are a lot of differences, however most of them found inside Stack modules,

    thus you shouldn't be troubled so much with this question (at least not now). :)

    A good start point for you, at this moment, is the Z-Stack developer's guide, by reading it

    you'll get the main idea, the differences and a lot of other stuff regarding ZigBee, Stack,

    End devices, routers, coordinator and etc..

     

    Br,

    Igor

    Br,
    Igor.

    Thank you for marking the thread as answered if your question was answered :)

  • In reply to Igor Sherer:

    Hi Iror.

     

    Thank you for your reply.

    I don't know option settings.

    [Project]>[Options]

    For example, I don't the setting

     

    [Project]>[Options]>[C/C++ Compiler]>[Diagnostics]

    Supress these Diagnostics: Pe001, Pa010

     

    Is there the reference document about this ?

    Best regards,

    kami

     

     

  • In reply to kami:

    Hi Kami,

     

    Try the Help tab in IAR EW (Guides like 8051 Embedded Workbench User Guide, etc...)

     

    Br,

    Igor

    Br,
    Igor.

    Thank you for marking the thread as answered if your question was answered :)

  • In reply to Igor Sherer:

    Hi Iror.

     

    In " GenericApp.c" , it is written

     

    This application sends "Hello World" to another "Generic" applicaiton every 15 Seconds.

    The application will also receive "Hello World" packets.

     

    Here, I have a question.

    Where is written sending time "15 Seconds" ?

    Probably, it indicates Timer program.

     

    Best regards,

    kami

  • In reply to kami:

    Hi Kami,

     

    I think there is a minor mistake, the period should be 5 seconds, not 15, however this is not the point.

    The answer you are looking for lies in the ZDO_STATE_CHANGE (search for it in GenericApp.c).

    You'll find a call for scheduling an OSAL timer (which later invokes another event):

    osal_start_timerEx( GenericApp_TaskID,
         GENERICAPP_SEND_MSG_EVT,
         GENERICAPP_SEND_MSG_TIMEOUT );

    GENERICAPP_SEND_MSG_TIMEOUT defined in GenericApp.h and the value of this constant is 5000

    (which means 5 seconds).

    In order to better understand this function, please refer to "OSAL_API.pdf" document.

    There is one more place the with the same call of this function, it is in GENERICAPP_SEND_MSG_EVT

    event, where the event is basically reschedules itself.

     

    Br,

    Igor

    Br,
    Igor.

    Thank you for marking the thread as answered if your question was answered :)

  • In reply to Igor Sherer:

    Hi Igor.

     

    Thank you for your reply.

    I agree your responce.

     

    I have more 2 questions.

    See GenericApp.c .

    1)

    I don't know global and local variables.

    I think these variables are struct.

    I would like to know these detail.

     

    2)

    Where is the main function?

    Is there in Zmain folder ?

     

    Best regards,

    kami

     

  • In reply to kami:

    Hi Kami,

     

    1) Can you please specify the names of these variables?

     

    2) The main function can be found in zmain.c, which is located in

    ZStack-CC2530-2.5.0\Projects\zstack\ZMain\TI2530DB\ 

     

    Br,

    Igor

    Br,
    Igor.

    Thank you for marking the thread as answered if your question was answered :)

  • In reply to Igor Sherer:

    Hi Igor.

     

    Please tell me

    variables :

    • cld_t
    • SimpleDescriptionFormat_t

    structs :

    • devStates_t
    • afAddrType_t

     

    Best regards,

    kami