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.

Migration from CC2430 to CC2431

Other Parts Discussed in Thread: CC2430, Z-STACK, CC2431

 

 

Hi everybody,

I wrote software uses z-stack, add debugged using SmartRF04Eb with CC2430. It worked great.

Now I have SmartRF04Eb with CC2431 and I cannot run the same code on it.

So my first question is if there is any migration application note from CC2430 to CC2431?

 

I started to debug the code on the new chip. The chip is running well , until the first initial functions:
  // Initialize NV System
  osal_nv_init( NULL )

It seems that the problem is Initnv():

if ( pgRes == OSAL_NV_PAGE_NULL )
  {
    for ( pg = OSAL_NV_PAGE_BEG; pg <= OSAL_NV_PAGE_END; pg++ )
    {
      erasePage( pg );
    }
    initNV();
  }
 
the function initNV() be repeated continuously.
 
Can anyone tell me what the source of this problem is? Is there any workaround?

  • The CC2430 and CC2431 is more or less the same chip. The only difference is the location suport in the CC2431. Code written to run on the CC2430 will run on the CC2431 as well. Don't know the stack, but could be that they do a sanity check of the chip id and/or revision in the code (by reading the two radio registers CHVER and CHIPID). Based on the name it seems like the initNV is preparing for writing, and i'm guessing here, the routing table and other variables to flash.

     

     

  • Had a quick look at the stack and it seems that the only chance of being stuck in the recursive initNV() is if the NV flash pages, OSAL_NV_PAGE_BEG - OSAL_NV_PAGE_END, fails to be erased.
    If you look at the erasePage() function you will see that it performs a sanity check on the voltage before trying to erase a page and if below a certain level it won't erase. Look like the default voltage level is set to 2.0V

     

  • I have the same problem on the CC2430EM. The initNV is recursively called to try to erase the NV flash. The sanity check on the voltage before trying to erase the page is passed but the the NV not seems to be erased and the initNV is recursively  called until stack overflow.

    I have connected an external power supply and changed four CC2430EM and two SmartRF04 boards with the same result.

    How can I try resolve this?

    My application:

    - SmartRF04EB 1.9

    - CC2430EM

    - IAR 7.50A

    - ZSTACK - 1.4.3-1.2.1 for CC2430

    - SampleAppl - CoordinatorEB

  • Although a bug in OSAL_Nv.c module has been found and fixed (see attached code) it does not seem like you all are running into that bug - it seems like it could be the problem of having to clean your flash pages - so initial download with the IAR set to erase flash:

    Project --> Options --> Debugger --> Texas Instruments --> Erase flash ... check the checkbox and Retain unchanged memory will be grayed out.

     

     

     

     

  • Unzip the file to get the OSAL_Nv.c module.

    OSAL_Nv.zip
  • Thanks Dirty Harry, but I'm  not able to solve the problem.

    As you say, the initNV function is not able to delete flash. The "Erase flash" check box was already checked and "Retain unchanged memory" is grayed out.


    The problem is on all the CC2430EM or CC2431EM, so I think that the problem is on the settings.

    I have noticed that the CC2430EM that I have, are marked Chipcon and not Texas, so I think that the chip CC2430 mounted have already some year, though the evaluation kit is never been used before.