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.

CC2540 F256 fails osal_snv_write/read functions

Other Parts Discussed in Thread: CC2540

Hi,

I recently changed CC2540 unit from F128 to F256. When I used F128 it worked fine. But as soon as I changed it to F256 it doesn't work for osal_snv functions (init, write, and read).

Please look below for what I did for changing from F128 to F256. If there is any missed step, please let me know.

C/C++ Compiler->Preprocessor->Defined Symbols: remove HAL_BOARD_F128

General Options->Target->Device information: change from CC2540F128 to CC2540F256

Linker->Config->Linker configuration file: change from ti_51ew_cc2540f128b.xcl to ti_51ew_cc2540b.xcl (checked Override default)

Thanks,

Brian

  • Hello Brian,
    Which version of IAR are you using?

    1)

    You need to select device type in "General Options" from "CC2541F128" to "CC2541F256".

    2)

    Try "lnk51ew_cc2540F256_banked.xcl" instead or just disable "override default" in the linker configuration menu.

  • Hi Eirik,

    Thanks for your answer. I'm using 

    IAR Embedded Workbench for 8051 IDE, including complete build chain and debugger. ver. 9.10.3

    IAR Embedded Workbench common components 7.0.6.3257

    Texas Instruments-BLE-CC254X-1.4.0

    1) I already did that (though I used CC2540F256 as I'm using CC2540).

    2) I tried "lnk51ew_cc2540F256_banked.xcl" and got below error.

    Fatal Error[e72]: Segment SLEEP_CODE must be defined in a segment definition option (-Z, -b or -P)

     I disabled "override default" but got same error.

    Can you please suggest me any other solution?

    Thanks,

    Brian

  • Hello Brian,

    Seems like you need to use the linker file you used initially which includes the SLEEP_CODE segment where halSetSleepMode(void); is placed:

    $PROJ_DIR$\..\..\common\cc2540\ti_51ew_cc2540b.xcl

    Have you tried to run one of the example projects from the installer? If this works make sure to copy all settings to your project.

    BTW: IAR workbench 8.20 is recommended for BLEv1.4:

    e2e.ti.com/.../1402240

  • Hi Eirik,

    I changed it back to ti_51ew_cc2540b.xcl and now it works. So strange.. Last time I used it, osal_snv_XX functions returned error but now it works okay..

    Anyhow, thanks to your support. Can you direct me to IAR workbench 8.20 download link? I tried but couldn't find it to download older version of IAR workbench.

    Thanks,
    Brian
  • Hello Brian,

    Sorry, we do not have a link. You will have to contact IAR directly.

  • I believe you will find it here: www.iar.com/.../ti-wireless