微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI蓝牙设计交流 > Sensor Controller Studio中产生的代码如何在CC2640/CC2650的M3中使用及整个平台环境搭建

Sensor Controller Studio中产生的代码如何在CC2640/CC2650的M3中使用及整个平台环境搭建

时间:10-02 整理:3721RD 点击:

Sensor Controller Studio中产生的代码如何在CC2640/CC2650的M3中使用及整个平台环境搭建,

比如Sensor Controller Studio 里生成的ADC代码如何在CC2640/CC2650的M3中调用?

Liu,

在sensor controller studio的安装目录下面,有个指导文档:

C:\Program Files (x86)\Texas Instruments\Sensor Controller Studio\docs\quick_start_guide_sensor_controller_studio.pdf

另外,以SCE的light sensor为例子,如何加入到simpleBLEPeripheral工程中去,如下:

Add the Sensor controller driver to SimpleBLEPeripheral_scif
-	Generate the analog light sensor drivers in SCS.
-	Push the button on the bottom right in the Code Generator pane to view output directory and copy the following files…
o	scif.c
o	scif.h
o	scif_framework.c 
o	scif_framework.h
o	scif_osal_tirtos.c
o	scif_osal_tirtos.h

… to a new folder (you will have to create it) called Scif_driver located here: C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\Source\Scif_driver

-	In the CC2640App_scif project, add a new group called “Scif_driver”.
-	Then add all the files you added above from the IAR project into this group.
-	Then add the two following files from the scs_hands_on_resources.zip to your app source folder     
( C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\Source\Application_scif ):
o	scif_task.c
o	scif_task.h

These are based on the generated file called main_tirtos.c and they are modified slightly to fit into our application.

-	Add the two scif_task files to your CC2640App_scif project in the Application_scif group.
-	In main.c which is located in the “Startup” project group, you need to add the 
o	Add <#include "scif_task.h"> in top of file main.c.
o	Add  <scif_createTask();> in function main() right after SimpleBLEPeripheral_createTask.

-	Add following path to “Additional Include Directories”  in project options:
$PROJ_DIR$/../../../Source/Scif_driver
-	Do the following changes in optical.c :
o	Add <#include "scif_task.h"> at the top.
o	In the optical_ProcessSensorEvent function set <data = sceLightData;>
In the scif taskFxn the bin value reported from the sensor controller will be directly updated in the optical characteristic value. The solution can be found as a patch (solution_patch.zip) in the scs_hands_on_resources.zip. This is neither the only solution nor is it the optimal one, so feel free to modify and implement the functionality how you see fit. You can for example try to integrate the SCE task into the simpleBLEPeriperhal task.

Hi Yan,

      谢谢你的快速回复,我现在按你的介绍尝试一下,非常感谢!

… to a new folder (you will have to create it) called Scif_driver located here: C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\Source\Scif_driver

-   In the CC2640App_scif project, add a new group called “Scif_driver”.

-   Then add all the files you added above from the IAR project into this group.

-   Then add the two following files from the scs_hands_on_resources.zip to your app source folder    

( C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\Source\Application_scif ):

o   scif_task.c

o   scif_task.h

怎么没有scif_task.c和scif_task.h,还有,scs_hands_on_resources.zip也没有呀

HI ,

    我也有此疑惑,

-          Then add the two following files from the scs_hands_on_resources.zip to your app source folder    

(C:\ti\simplelink\ble_cc26xx_2_00_00_42893\Projects\ble\SimpleBLEPeripheral\CC26xx\Source\Application_scif):

  • scif_task.c
  • scif_task.h

这2个文件如何修改那?

另外:

-          Do the following changes in optical.c :

  • Add <#include "scif_task.h"> at the top.
  • In the optical_ProcessSensorEventfunction set <data = sceLightData;>

这个optical.c文件有什么作用,也没有啊?

期待IT的答复!

 

liang, 各位,

这两个文件并不是SCS 自动产生的,需要自己写。。。我把两个自己写过的附件在这里,你们可以拿去做模板,这两个是配合SCS的BLE Blinker工程用的。

3286.scif_task.c

8547.scif_task.h

我将这两个档案改为scif.c及scif.h放到analog_light_sensor目录下,

Build时反而在Setup目录下的rom.cfg出现错误而无法继续build,请问这会是甚么问题?

我想问下,问题解决了吗?

No, I give up

请问,optical.c是什么文件

建议看看ti-rtos里的wsnnode例程 C:\ti\tirtos_cc13xx_cc26xx_2_21_00_06\examples\IAR\CC2650DK_7ID\rfWsnNode,SceAdc是可以自己更改的,sce文件夹是scs自动生成的。

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top