Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 226f38bbba | |||
| f4861bb6cb | |||
| c29273f7e6 | |||
| f3391fe63b | |||
| 332e8a127f | |||
| ab83ab2ce0 | |||
| 498a3aceb6 | |||
| 41c6cb2964 | |||
| 33c3db2601 | |||
| 60c885a625 | |||
| 127b5ff4ca | |||
| d78b0372a5 | |||
| d648e23b12 | |||
| 2a6cd49748 | |||
| b19b818927 | |||
| 8876319987 |
+1
-1
@@ -4,7 +4,7 @@
|
||||
#folder=$($path | awk -F"/" '{$NF}')
|
||||
folder=$(basename "$(pwd)")
|
||||
|
||||
if [ "$folder" == "bioprocc2650" ]; then
|
||||
if [ "$folder" == "ti" ]; then
|
||||
year=$(date +%-y)
|
||||
month=$(date +%-m)
|
||||
day=$(date +%-d)
|
||||
|
||||
+3
-3
@@ -3,6 +3,6 @@
|
||||
* step by the lib_search utility
|
||||
*/
|
||||
|
||||
"C:\ti\simplelink\ble_sdk_2_02_02_25\blelib\host\host_pxxx.a"
|
||||
"C:\ti\simplelink\ble_sdk_2_02_02_25\blelib\ctrl\cc2640\cc2640_ctrl_pxxx_ext.a"
|
||||
"C:\ti\simplelink\ble_sdk_2_02_02_25\blelib\hci_tl\cc26xx\cc26xx_hci_tl_none_v41_v42.a"
|
||||
"/home/alan/ti/simplelink/ble_sdk_2_02_02_25/blelib/host/host_pxxx.a"
|
||||
"/home/alan/ti/simplelink/ble_sdk_2_02_02_25/blelib/ctrl/cc2640/cc2640_ctrl_pxxx_ext.a"
|
||||
"/home/alan/ti/simplelink/ble_sdk_2_02_02_25/blelib/hci_tl/cc26xx/cc26xx_hci_tl_none_v41_v42.a"
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# This file was generated based on the configuration script:
|
||||
# C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\config\app_ble.cfg
|
||||
# /home/alan/ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/config/app_ble.cfg
|
||||
#
|
||||
# This makefile may be included in other makefiles that need to build
|
||||
# the libraries containing the compiled source files generated as
|
||||
@@ -14,9 +14,9 @@
|
||||
#
|
||||
# The absolute path to the generated source directory (at the time the
|
||||
# sources were generated) is:
|
||||
# C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\config\src
|
||||
# /home/alan/ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/config/src
|
||||
#
|
||||
GEN_SRC_DIR ?= ../../config/src
|
||||
GEN_SRC_DIR ?= ../../../ti/simplelink/ble_sdk_2_02_02_25/examples/cc2650em/simple_peripheral/ccs/config/src
|
||||
|
||||
ifeq (,$(wildcard $(GEN_SRC_DIR)))
|
||||
$(error "ERROR: GEN_SRC_DIR must be set to the directory containing the generated sources")
|
||||
|
||||
Executable → Regular
BIN
Binary file not shown.
Executable → Regular
BIN
Binary file not shown.
Executable → Regular
BIN
Binary file not shown.
Executable → Regular
BIN
Binary file not shown.
Executable → Regular
+15
-15
@@ -1,29 +1,29 @@
|
||||
|
||||
XOPTS = -I"C:/ti/xdctools_3_32_02_25_core/packages/" -Dxdc_target_types__=C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/std.h -Dxdc_target_name__=M3
|
||||
XOPTS = -I"/home/alan/ti/xdctools_3_32_01_22_core/packages/" -Dxdc_target_types__=/home/alan/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/targets/arm/elf/std.h -Dxdc_target_name__=M3
|
||||
|
||||
vpath % C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/
|
||||
vpath %.c C:/ti/xdctools_3_32_02_25_core/packages/
|
||||
vpath % /home/alan/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/
|
||||
vpath %.c /home/alan/ti/xdctools_3_32_01_22_core/packages/
|
||||
|
||||
CCOPTS = --endian=little -mv7M3 --abi=eabi -q -ms --opt_for_speed=0 --program_level_compile -o3 -g --optimize_with_debug -Dti_sysbios_knl_Task_minimizeLatency__D=FALSE -Dti_sysbios_family_arm_cc26xx_Boot_driverlibVersion=2 -Dti_sysbios_knl_Clock_stopCheckNext__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_enableException__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_disablePriority__D=32U -Dti_sysbios_family_arm_m3_Hwi_numSparseInterrupts__D=0U
|
||||
|
||||
XDC_ROOT = C:/ti/xdctools_3_32_02_25_core/packages/
|
||||
XDC_ROOT = /home/alan/ti/xdctools_3_32_01_22_core/packages/
|
||||
|
||||
BIOS_ROOT = C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/
|
||||
BIOS_ROOT = /home/alan/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/
|
||||
|
||||
BIOS_DEFS = -Dti_sysbios_BIOS_swiEnabled__D=TRUE -Dti_sysbios_BIOS_taskEnabled__D=TRUE -Dti_sysbios_BIOS_clockEnabled__D=TRUE -Dti_sysbios_BIOS_runtimeCreatesEnabled__D=TRUE -Dti_sysbios_knl_Task_moduleStateCheckFlag__D=FALSE -Dti_sysbios_knl_Task_objectCheckFlag__D=FALSE -Dti_sysbios_hal_Hwi_DISABLE_ALL_HOOKS -Dti_sysbios_knl_Swi_DISABLE_ALL_HOOKS -Dti_sysbios_BIOS_smpEnabled__D=FALSE -Dti_sysbios_Build_useHwiMacros -Dti_sysbios_knl_Swi_numPriorities__D=6 -Dti_sysbios_knl_Task_deleteTerminatedTasks__D=FALSE -Dti_sysbios_knl_Task_numPriorities__D=6 -Dti_sysbios_knl_Task_checkStackFlag__D=FALSE -Dti_sysbios_knl_Task_initStackFlag__D=TRUE -Dti_sysbios_knl_Task_DISABLE_ALL_HOOKS -Dti_sysbios_knl_Clock_TICK_SOURCE=ti_sysbios_knl_Clock_TickSource_TIMER -Dti_sysbios_knl_Clock_TICK_MODE=ti_sysbios_knl_Clock_TickMode_DYNAMIC -Dti_sysbios_hal_Core_delegate_getId=ti_sysbios_hal_CoreNull_getId__E -Dti_sysbios_hal_Core_delegate_interruptCore=ti_sysbios_hal_CoreNull_interruptCore__E -Dti_sysbios_hal_Core_delegate_lock=ti_sysbios_hal_CoreNull_lock__E -Dti_sysbios_hal_Core_delegate_unlock=ti_sysbios_hal_CoreNull_unlock__E -Dti_sysbios_hal_Core_numCores__D=1 -Dti_sysbios_hal_CoreNull_numCores__D=1 -Dti_sysbios_utils_Load_taskEnabled__D=TRUE -Dti_sysbios_utils_Load_swiEnabled__D=FALSE -Dti_sysbios_utils_Load_hwiEnabled__D=FALSE -Dti_sysbios_family_arm_m3_Hwi_dispatcherSwiSupport__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_dispatcherTaskSupport__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_dispatcherAutoNestingSupport__D=TRUE -Dti_sysbios_family_arm_m3_Hwi_dispatcherIrpTrackingSupport__D=TRUE -Dti_sysbios_knl_Semaphore_supportsEvents__D=FALSE -Dti_sysbios_knl_Semaphore_supportsPriority__D=FALSE -Dxdc_runtime_Assert_DISABLE_ALL -Dxdc_runtime_Log_DISABLE_ALL
|
||||
|
||||
BIOS_INC = -I"C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/"
|
||||
BIOS_INC = -I"/home/alan/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/"
|
||||
|
||||
TARGET_INC = -I"C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/"
|
||||
TARGET_INC = -I"/home/alan/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/"
|
||||
|
||||
INCS = $(BIOS_INC) $(TARGET_INC) --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/include" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/icall/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/dev_info" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/common/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/heapmgr" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/controller/cc26xx/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/target" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common/cc26xx" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/osal/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/sdata" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/saddr" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/components/icall/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="C:/ti/simplelink/ble_sdk_2_02_02_25/src/rom" --include_path="C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/cc26xxware_2_24_03_17272" -IC:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/
|
||||
INCS = $(BIOS_INC) $(TARGET_INC) --include_path="/home/alan/ti/ccs900/ccs/tools/compiler/ti-cgt-arm_20.2.1.LTS/include" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/icall/inc" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles/cc26xx" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/roles" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/dev_info" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile/cc26xx" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/profiles/simple_profile" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/common/cc26xx" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/components/heapmgr" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/controller/cc26xx/inc" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/target" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/target/_common/cc26xx" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/components/hal/src/inc" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/components/osal/src/inc" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/sdata" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/components/services/src/saddr" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/components/icall/src/inc" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/inc" --include_path="/home/alan/ti/simplelink/ble_sdk_2_02_02_25/src/rom" --include_path="/home/alan/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/cc26xxware_2_24_03_17272" -I/home/alan/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/
|
||||
|
||||
CC = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/include
|
||||
ASM = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/bin/armcl -c $(CCOPTS) -I C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/include
|
||||
AR = C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/bin/armar rq
|
||||
CC = /home/alan/ti/ccs900/ccs/tools/compiler/ti-cgt-arm_20.2.1.LTS/bin/armcl -c $(CCOPTS) -I /home/alan/ti/ccs900/ccs/tools/compiler/ti-cgt-arm_20.2.1.LTS/include
|
||||
ASM = /home/alan/ti/ccs900/ccs/tools/compiler/ti-cgt-arm_20.2.1.LTS/bin/armcl -c $(CCOPTS) -I /home/alan/ti/ccs900/ccs/tools/compiler/ti-cgt-arm_20.2.1.LTS/include
|
||||
AR = /home/alan/ti/ccs900/ccs/tools/compiler/ti-cgt-arm_20.2.1.LTS/bin/armar rq
|
||||
|
||||
DEL = C:/ti/xdctools_3_32_02_25_core/packages/../bin/rm -f
|
||||
CP = C:/ti/xdctools_3_32_02_25_core/packages/../bin/cp -f
|
||||
DEL = rm -f
|
||||
CP = cp -f
|
||||
|
||||
define RM
|
||||
$(if $(wildcard $1),$(DEL) $1,:)
|
||||
@@ -100,8 +100,8 @@ rom_sysbios.obj: BIOS.c knl/Clock.c knl/Idle.c knl/Intrinsics.c knl/Event.c knl/
|
||||
rom_sysbios.aem3: rom_sysbios.obj m3_Hwi_asm.obj m3_Hwi_asm_switch.obj m3_IntrinsicsSupport_asm.obj m3_TaskSupport_asm.obj
|
||||
@-$(call RM, $@)
|
||||
@echo arem3 $^ ...
|
||||
@$(AR) $@ $^ C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/rom/cortexm/cc26xx/golden/CC26xx/rom_sysbios_config.obj
|
||||
@$(AR) $@ $^ /home/alan/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages/ti/sysbios/rom/cortexm/cc26xx/golden/CC26xx/rom_sysbios_config.obj
|
||||
|
||||
clean:
|
||||
@$(DEL) ..\makefile.libs
|
||||
@$(DEL) ../makefile.libs
|
||||
@-$(call RM, *)
|
||||
|
||||
Executable → Regular
BIN
Binary file not shown.
Executable → Regular
BIN
Binary file not shown.
@@ -106,7 +106,7 @@
|
||||
*/
|
||||
|
||||
#ifdef USE_ICALL
|
||||
#include <ICall.h>
|
||||
#include <icall.h>
|
||||
|
||||
typedef ICall_CSState halIntState_t;
|
||||
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@
|
||||
#include <inc/hw_aon_rtc.h>
|
||||
#include <driverlib/aon_rtc.h>
|
||||
#include <driverlib/aon_event.h>
|
||||
#include "ICall.h"
|
||||
#include "icall.h"
|
||||
|
||||
/*******************************************************************************
|
||||
* MACROS
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "ICall.h"
|
||||
#include "icall.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -55,7 +55,7 @@ extern "C"
|
||||
// includes
|
||||
// ****************************************************************************
|
||||
#include "hal_types.h"
|
||||
#include "OSAL.h"
|
||||
#include "osal.h"
|
||||
|
||||
// ****************************************************************************
|
||||
// defines
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
#ifdef ICALL_JT
|
||||
#include "icall_JT.h"
|
||||
#else
|
||||
#include <ICall.h>
|
||||
#include <icall.h>
|
||||
#endif /* ICALL_JT */
|
||||
#endif /* USE_ICALL */
|
||||
|
||||
@@ -405,7 +405,7 @@ uint32 osal_build_uint32( uint8 *swapped, uint8 len )
|
||||
unsigned char * _ltoa(unsigned long l, unsigned char *buf, unsigned char radix)
|
||||
{
|
||||
#if defined (__TI_COMPILER_VERSION) || defined (__TI_COMPILER_VERSION__)
|
||||
return ( (unsigned char*)ltoa( l, (char *)buf ) );
|
||||
return ( (unsigned char*)ltoa( l, (char *)buf, radix ) );
|
||||
#elif defined( __GNUC__ )
|
||||
return ( (char*)ltoa( l, buf, radix ) );
|
||||
#else
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
Release Date: 2018-04-02 18:03:35
|
||||
*****************************************************************************/
|
||||
|
||||
#include "OSAL.h"
|
||||
#include "OSAL_Tasks.h"
|
||||
#include "osal.h"
|
||||
#include "osal_tasks.h"
|
||||
|
||||
#include "hal_mcu.h"
|
||||
#include "osal_cbtimer.h"
|
||||
|
||||
@@ -51,13 +51,13 @@
|
||||
*/
|
||||
|
||||
#include "comdef.h"
|
||||
#include "OSAL.h"
|
||||
#include "OSAL_Memory.h"
|
||||
#include "osal.h"
|
||||
#include "osal_memory.h"
|
||||
|
||||
#ifdef ICALL_JT
|
||||
#include "icall_JT.h"
|
||||
#else
|
||||
#include <ICall.h>
|
||||
#include <icall.h>
|
||||
#endif /* ICALL_JT */
|
||||
|
||||
/**************************************************************************************************
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
#ifdef ICALL_JT
|
||||
#include "icall_JT.h"
|
||||
#else
|
||||
#include <ICall.h>
|
||||
#include <icall.h>
|
||||
#endif /* ICALL_JT */
|
||||
#endif /* USE_ICALL */
|
||||
|
||||
|
||||
@@ -62,11 +62,11 @@ extern "C"
|
||||
#include <limits.h>
|
||||
|
||||
#include "comdef.h"
|
||||
#include "OSAL_Memory.h"
|
||||
#include "OSAL_Timers.h"
|
||||
#include "osal_memory.h"
|
||||
#include "osal_timers.h"
|
||||
|
||||
#ifdef USE_ICALL
|
||||
#include <ICall.h>
|
||||
#include <icall.h>
|
||||
#endif /* USE_ICALL */
|
||||
|
||||
/*********************************************************************
|
||||
|
||||
@@ -80,7 +80,7 @@ the last entry in the page (higher memory address).
|
||||
#include "hal_flash.h"
|
||||
#include "hal_types.h"
|
||||
#include "pwrmon.h"
|
||||
#include "OSAL.h"
|
||||
#include "osal.h"
|
||||
#include "osal_snv.h"
|
||||
#include "hal_assert.h"
|
||||
#include <driverlib/vims.h>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
#include <inc/hw_fcfg1.h>
|
||||
|
||||
#include "Board.h"
|
||||
#include "board.h"
|
||||
|
||||
// RF Driver
|
||||
#include <ti/drivers/rf/RF.h>
|
||||
|
||||
+10
-1
@@ -17,7 +17,7 @@ static void check_register(uint8_t register_to_check, uint16_t instruction_to_fi
|
||||
if(check_reg_counter < 6){
|
||||
SPICallBack = CONTINUOUS_TRANS;
|
||||
spi_txbuf[0] = register_to_check & 0x7F;
|
||||
spi_txbuf[1] = NEULIVE_STATE.state;
|
||||
spi_txbuf[1] = rec_sti_command;
|
||||
spi_txbuf[2] = check_reg_counter;
|
||||
|
||||
check_reg_counter ++;
|
||||
@@ -28,6 +28,15 @@ static void check_register(uint8_t register_to_check, uint16_t instruction_to_fi
|
||||
if(check_ins(instruction_to_fit)){
|
||||
NEULIVE_STATE.state = next_state;
|
||||
SPICallBack = ONE_SHOT_SPI;
|
||||
|
||||
// update rec_sti_command
|
||||
if(!(rec_sti_command & ENABLE_STI)){
|
||||
// close STI success
|
||||
rec_sti_command &= ~STATUS_STI;
|
||||
}
|
||||
// if(rec_sti_command & ENABLE_STI){
|
||||
// rec_sti_command |= STATUS_STI;
|
||||
// }
|
||||
}
|
||||
else{
|
||||
// resend instruction
|
||||
|
||||
+1
-1
@@ -133,7 +133,7 @@ static uint8_t headstage_led_set_color(uint16_t *ins_buf, uint8_t repeat, uint8_
|
||||
|
||||
#ifdef HEADSTAGE_LED_USE_SPI
|
||||
|
||||
#include <Board.h>
|
||||
#include <board.h>
|
||||
#include <ti/drivers/SPI.h>
|
||||
#include <ti/drivers/dma/UDMACC26XX.h>
|
||||
#include <ti/drivers/spi/SPICC26XXDMA.h>
|
||||
|
||||
+115
-19
@@ -169,7 +169,7 @@ static void FlushNotify();
|
||||
#define EVT_NEU_REG_SPI 0x0008 /** register spi event */
|
||||
|
||||
/** clock setting */
|
||||
#define NEU_SYS_CLK 2000000 /**< 10Mhz */
|
||||
#define NEU_SYS_CLK 4000000 /**< 10Mhz */
|
||||
#define NEU_POLY_R_CLK 1000 /**< 1khz */
|
||||
#define NEU_SPI_FREQ NEU_SYS_CLK/10 /**< 1Mhz */ // should be NEU_SYS_CLK/10
|
||||
//#define NEU_LED_FREQ 1000000 /**< 1Mhz */
|
||||
@@ -299,6 +299,12 @@ typedef enum{
|
||||
#include "headstage_rec_ins.h"
|
||||
#include "headstage_sti_ins.h"
|
||||
|
||||
/* Debug function and parameter
|
||||
*
|
||||
*/
|
||||
static uint8_t data_rate_counter = 0;
|
||||
static uint32_t msg_counter = 0;
|
||||
static void SimpleBLEPeripheral_blastData();
|
||||
|
||||
/*
|
||||
* todo: need to define some procedure to detect this device status
|
||||
@@ -515,24 +521,29 @@ static void headstage_update_ris_instruction(uint8_t ins_len, uint8_t* instructi
|
||||
|
||||
case NEU_MULTI_STI: {
|
||||
uint8_t ch = instruction[1];
|
||||
uint8_t sti_cycles = instruction[2];
|
||||
INSTRUCTION.sti_t1[ch] = (instruction[3] << 8) | instruction[4];
|
||||
INSTRUCTION.sti_t2[ch] = (instruction[5] << 8) | instruction[6];
|
||||
INSTRUCTION.sti_t3[ch] = (instruction[7] << 8) | instruction[8];
|
||||
INSTRUCTION.sti_t4[ch] = (0x00 << 24) | (instruction[9] << 16) | (instruction[10] << 8) | instruction[11];
|
||||
INSTRUCTION.sti_t5[ch] = (instruction[12] << 8) | instruction[13];
|
||||
INSTRUCTION.current_sti_cycle[ch] = sti_cycles;
|
||||
// uint8_t sti_cycles = instruction[2];
|
||||
// INSTRUCTION.sti_t1[ch] = (instruction[3] << 8) | instruction[4];
|
||||
// INSTRUCTION.sti_t2[ch] = (instruction[5] << 8) | instruction[6];
|
||||
// INSTRUCTION.sti_t3[ch] = (instruction[7] << 8) | instruction[8];
|
||||
// INSTRUCTION.sti_t4[ch] = (0x00 << 24) | (instruction[9] << 16) | (instruction[10] << 8) | instruction[11];
|
||||
// INSTRUCTION.sti_t5[ch] = (instruction[12] << 8) | instruction[13];
|
||||
// INSTRUCTION.current_sti_cycle[ch] = sti_cycles;
|
||||
|
||||
for(int i=0 ; i<8 ; i++){
|
||||
uint8_t sti_cycles = instruction[2];
|
||||
INSTRUCTION.sti_t1[i] = (instruction[3] << 8) | instruction[4];
|
||||
INSTRUCTION.sti_t2[i] = (instruction[5] << 8) | instruction[6];
|
||||
INSTRUCTION.sti_t3[i] = (instruction[7] << 8) | instruction[8];
|
||||
INSTRUCTION.sti_t4[i] = (0x00 << 24) | (instruction[9] << 16) | (instruction[10] << 8) | instruction[11];
|
||||
INSTRUCTION.sti_t5[i] = (instruction[12] << 8) | instruction[13];
|
||||
INSTRUCTION.current_sti_cycle[i] = sti_cycles;
|
||||
}
|
||||
|
||||
// INSTRUCTION.sti_t1[n_ch] = (instruction[3] << 8) | instruction[4];
|
||||
// INSTRUCTION.sti_t2[n_ch] = (instruction[5] << 8) | instruction[6];
|
||||
// INSTRUCTION.sti_t3[n_ch] = (instruction[7] << 8) | instruction[8];
|
||||
// INSTRUCTION.sti_t4[n_ch] = (0x00 << 24) | (instruction[9] << 16) | (instruction[10] << 8) | instruction[11];
|
||||
// INSTRUCTION.sti_t5[n_ch] = (instruction[12] << 8) | instruction[13];
|
||||
// INSTRUCTION.current_sti_cycle[n_ch] = sti_cycles;
|
||||
break;
|
||||
}
|
||||
|
||||
case NEU_REC_PARAM: {
|
||||
headstage_led_color(COLOR_MAGENTA);
|
||||
uint8_t vgrp = instruction[0] & 0x1F;
|
||||
uint8_t vgrn = (instruction[1] & 0xF8) >> 3;
|
||||
uint8_t vgr_int_old = ((instruction[1] & 0x07) << 2) | ((instruction[2] & 0xC0) >> 6);
|
||||
@@ -563,8 +574,8 @@ static void headstage_update_ris_instruction(uint8_t ins_len, uint8_t* instructi
|
||||
INSTRUCTION.vgr_intp = 16;
|
||||
INSTRUCTION.vgr_intn = 16;
|
||||
INSTRUCTION.vgr_int_old = 16;
|
||||
INSTRUCTION.recording_channel = 0b0000000001000010;
|
||||
INSTRUCTION.adc_clock_ratio = 50;
|
||||
INSTRUCTION.recording_channel = 0b0000000000000010;
|
||||
INSTRUCTION.adc_clock_ratio = 100; // sample rate = [NEU_SYS_CLK / (sys_clk_ratio = 10)] / adc_clock_ratio
|
||||
INSTRUCTION.sys_clk_ratio = 10;
|
||||
INSTRUCTION.sti_clock_ratio = 10;
|
||||
INSTRUCTION.amplifier_gain = 0;
|
||||
@@ -586,7 +597,7 @@ static void headstage_update_ris_instruction(uint8_t ins_len, uint8_t* instructi
|
||||
INSTRUCTION.current_sti_cycle[0] = 100;
|
||||
INSTRUCTION.current_sti_cycle[1] = 100;
|
||||
INSTRUCTION.current_sti_cycle[8] = 10; // ch8 is volt ch
|
||||
INSTRUCTION.sti_channel = 0b0000000000000011; // 0bxxxx_xxxv_cccc_cccc, c = current; v = volt, x = don't care
|
||||
INSTRUCTION.sti_channel = 0b0000000000000000; // 0bxxxx_xxxv_cccc_cccc, c = current; v = volt, x = don't care
|
||||
INSTRUCTION.arbitrary_en = 0;
|
||||
INSTRUCTION.arbitrary_index = 0;
|
||||
INSTRUCTION.sti_mode = 0; // 1 = continuous mode; 0 = limit mode
|
||||
@@ -877,7 +888,6 @@ static void headstage_update_cis_instruction(uint8_t cis_oper) {
|
||||
cdr_buf[6] = 0xCD;
|
||||
}
|
||||
|
||||
|
||||
SimpleProfile_SetParameter(BLE_CDR_BUFF_CHAR, BLE_CDR_SAMLL_SIZE, cdr_buf);
|
||||
break;
|
||||
}
|
||||
@@ -1084,6 +1094,16 @@ static void headstage_neu_state_spi() {
|
||||
|
||||
// recording
|
||||
else{
|
||||
// for(int i=0 ; i<SPI_BUFFER_SIZE ; i++){
|
||||
// spi_txbuf[i] = 0;
|
||||
// }
|
||||
//
|
||||
// if(data_rate_counter >= 63){
|
||||
// data_rate_counter = 0;
|
||||
// SimpleBLEPeripheral_blastData();
|
||||
// }
|
||||
// data_rate_counter ++;
|
||||
// headstage_spi_transaction(3);
|
||||
headstage_neu_append_notify_data();
|
||||
AppendSPITX(0, 0);
|
||||
headstage_spi_transaction(SPI_BUFFER_SIZE);
|
||||
@@ -1234,7 +1254,6 @@ static void headstage_neu_state_spi() {
|
||||
}
|
||||
|
||||
case NEU_CHECK_STI_INT: {
|
||||
rec_sti_command &= ~STATUS_STI;
|
||||
|
||||
if(rec_sti_command & STATUS_REC){
|
||||
check_register(STI_CHANNEL_REG, 0, NEU_PREPARE_READ);
|
||||
@@ -1271,4 +1290,81 @@ static void headstage_neu_state_spi() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* @fn SimpleBLEPeripheral_blastData
|
||||
*
|
||||
* @brief Sends ATT notifications in a tight while loop to demo
|
||||
* throughput
|
||||
*
|
||||
* @param none
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
static void SimpleBLEPeripheral_blastData() {
|
||||
|
||||
uint32_t not_time_stamp = headstage_time_stamp_us();
|
||||
headstage_notify_buffer[0] = (msg_counter >> 24) & 0xFF;
|
||||
headstage_notify_buffer[1] = (msg_counter >> 16) & 0xFF;
|
||||
headstage_notify_buffer[2] = (msg_counter >> 8) & 0xFF;
|
||||
headstage_notify_buffer[3] = msg_counter & 0xFF;
|
||||
headstage_notify_buffer[4] = 0xFB;
|
||||
headstage_notify_buffer[5] = not_time_stamp & 0xFF;
|
||||
headstage_notify_buffer[6] = (not_time_stamp >> 8) & 0xFF;
|
||||
headstage_notify_buffer[7] = (not_time_stamp >> 16) & 0xFF;
|
||||
headstage_notify_buffer[8] = (not_time_stamp >> 24) & 0xFF;
|
||||
msg_counter++;
|
||||
SimpleProfile_SetParameter(BLE_NOT_BUFF_CHAR, BLE_NOT_BUFF_SIZE, headstage_notify_buffer);
|
||||
|
||||
// Subtract the total packet overhead of ATT and L2CAP layer from notification payload
|
||||
// uint16_t len = MAX_PDU_SIZE - TOTAL_PACKET_OVERHEAD;
|
||||
// attHandleValueNoti_t noti;
|
||||
// bStatus_t status;
|
||||
// noti.handle = 0x27;
|
||||
// noti.len = len;
|
||||
//
|
||||
// uint32_t not_time_stamp;
|
||||
//
|
||||
// // Store hte connection handle for future reference
|
||||
// uint16_t connectionHandle;
|
||||
// GAPRole_GetParameter(GAPROLE_CONNHANDLE, &connectionHandle);
|
||||
//
|
||||
// not_time_stamp = Timestamp_get32() / 2;
|
||||
// noti.pValue = (uint8 *)GATT_bm_alloc(connectionHandle, ATT_HANDLE_VALUE_NOTI, GATT_MAX_MTU, &len);
|
||||
//
|
||||
// if (noti.pValue != NULL) // if allocated
|
||||
// {
|
||||
// // Place index
|
||||
// noti.pValue[2] = not_time_stamp & 0xFF;
|
||||
// noti.pValue[3] = (not_time_stamp >> 8) & 0xFF;
|
||||
// noti.pValue[4] = (not_time_stamp >> 16) & 0xFF;
|
||||
// noti.pValue[5] = (not_time_stamp >> 24) & 0xFF;
|
||||
// noti.pValue[6] = 100;
|
||||
// noti.pValue[7] = 0;
|
||||
//
|
||||
// // Attempt to send the notification
|
||||
// status = GATT_Notification(connectionHandle, ¬i, GATT_NO_AUTHENTICATION);
|
||||
// if (status != SUCCESS) // if noti not sent
|
||||
// {
|
||||
//// PIN_setOutputValue(hSbpPins, Board_LED1, Board_LED_ON);
|
||||
// headstage_led_color(COLOR_RED);
|
||||
// headstage_led_color(COLOR_BLACK);
|
||||
// GATT_bm_free((gattMsg_t *)¬i, ATT_HANDLE_VALUE_NOTI);
|
||||
// } else {
|
||||
// // Notification is successfully sent, increment counters
|
||||
//// Display_print0(dispHandle, 4, 0, "success");
|
||||
//// PIN_setOutputValue(hSbpPins, Board_LED2, Board_LED_ON);
|
||||
// headstage_led_color(COLOR_BLUE);
|
||||
// headstage_led_color(COLOR_BLACK);
|
||||
// msg_counter++;
|
||||
// }
|
||||
// } else {
|
||||
// // bleNoResources was returned
|
||||
// asm(" NOP ");
|
||||
// }
|
||||
|
||||
// Reset debug pins
|
||||
// PIN_setOutputValue(hSbpPins, Board_LED1, Board_LED_OFF);
|
||||
// PIN_setOutputValue(hSbpPins, Board_LED2, Board_LED_OFF);
|
||||
}
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
#ifndef HEADSTAGE_PIN_H
|
||||
#define HEADSTAGE_PIN_H
|
||||
|
||||
#include <Board.h>
|
||||
#include <board.h>
|
||||
#include <ti/drivers/PIN.h>
|
||||
|
||||
#if defined(HEADSTAGE_TNI_H)
|
||||
|
||||
+6
-6
@@ -3,15 +3,15 @@
|
||||
#define VERSION_DATE
|
||||
|
||||
#define VERSION_DATE_YEAR 20
|
||||
#define VERSION_DATE_MONTH 7
|
||||
#define VERSION_DATE_DAY 9
|
||||
#define VERSION_DATE_HOUR 10
|
||||
#define VERSION_DATE_MINUTE 16
|
||||
#define VERSION_DATE_MONTH 8
|
||||
#define VERSION_DATE_DAY 3
|
||||
#define VERSION_DATE_HOUR 17
|
||||
#define VERSION_DATE_MINUTE 42
|
||||
|
||||
// this is NOT the version hash !!
|
||||
// it's the last version hash
|
||||
#define VERSION_HASH 549db3f6d4f60019e726ba2b4318c2dd968cf3d5
|
||||
#define VERSION_GIT_BRANCH Neulive2.0_developement
|
||||
#define VERSION_HASH f4861bb6cb427dcb36cb0cb6e8f1c962dbd89fa8
|
||||
#define VERSION_GIT_BRANCH neulive20_linux_debug
|
||||
|
||||
static void get_board_name(char *board_name_ch, uint8 *board_name_int, uint8 name_size){
|
||||
uint8 name_offset = 18;
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
#ifndef HEADSTAGE_WATCHDOG
|
||||
#define HEADSTAGE_WATCHDOG
|
||||
|
||||
#include <Board.h>
|
||||
#include <board.h>
|
||||
#include <ti/drivers/Watchdog.h>
|
||||
#include <ti/drivers/watchdog/WatchdogCC26XX.h>
|
||||
|
||||
|
||||
+8
-1
@@ -13,6 +13,7 @@
|
||||
static uint8_t not_buf_offset = NOT_BUF_OFFSET_INIT;
|
||||
static uint32_t not_time_stamp = 0;
|
||||
|
||||
static uint32_t debug_counter = 0;
|
||||
static void headstage_notify_set_timestamp() {
|
||||
not_time_stamp = headstage_time_stamp_us();
|
||||
|
||||
@@ -20,12 +21,18 @@ static void headstage_notify_set_timestamp() {
|
||||
headstage_notify_buffer[3] = (not_time_stamp >> 8) & 0xFF;
|
||||
headstage_notify_buffer[4] = (not_time_stamp >> 16) & 0xFF;
|
||||
headstage_notify_buffer[5] = (not_time_stamp >> 24) & 0xFF;
|
||||
|
||||
// headstage_notify_buffer[2] = (debug_counter >> 24) & 0xFF;
|
||||
// headstage_notify_buffer[3] = (debug_counter >> 16) & 0xFF;
|
||||
// headstage_notify_buffer[4] = (debug_counter >> 8) & 0xFF;
|
||||
// headstage_notify_buffer[5] = debug_counter & 0xFF;
|
||||
// debug_counter ++;
|
||||
}
|
||||
|
||||
static void headstage_notify_flip_buffer() {
|
||||
uint8_t data_count = (not_buf_offset - NOT_BUF_OFFSET_INIT) / 3;
|
||||
|
||||
headstage_notify_buffer[0] = CHIP_ID;
|
||||
headstage_notify_buffer[0] = 4;
|
||||
headstage_notify_buffer[1] = data_count;
|
||||
|
||||
not_buf_offset = NOT_BUF_OFFSET_INIT;
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ static PIN_Config headstage_pin_configuration[] = { //
|
||||
PIN_DC_DC | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
|
||||
PIN_BATT_HALF | PIN_INPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
|
||||
PIN_STI_CLK | PIN_INPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
|
||||
//
|
||||
// TODO : add PIN_IRQ for STI clock to detect STI status (update LED & resend STI command if failed before)
|
||||
PIN_TERMINATE};
|
||||
|
||||
#endif // HEADSTAGE_PIN_UNI_H
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
#ifndef HEADSTAGE_PWM_H
|
||||
#define HEADSTAGE_PWM_H
|
||||
|
||||
#include <Board.h>
|
||||
#include <board.h>
|
||||
#include <ti/drivers/PWM.h>
|
||||
|
||||
static PWM_Handle headstage_system_pwm_handle = NULL;
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
#error "put HEADSTAGE_MA_USE_SPI2 in predefined"
|
||||
#endif
|
||||
|
||||
#include <Board.h>
|
||||
#include <board.h>
|
||||
#include <ti/drivers/SPI.h>
|
||||
#include <ti/drivers/dma/UDMACC26XX.h>
|
||||
#include <ti/drivers/spi/SPICC26XXDMA.h>
|
||||
|
||||
+3
-3
@@ -120,17 +120,17 @@
|
||||
// Maximum connection interval (units of 1.25ms, 800=1000ms) if automatic
|
||||
// parameter update request is enabled
|
||||
//#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 6
|
||||
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 30
|
||||
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 40
|
||||
|
||||
#else //! FEATURE_OAD
|
||||
// Minimum connection interval (units of 1.25ms, 8=10ms) if automatic
|
||||
// parameter update request is enabled
|
||||
#define DEFAULT_DESIRED_MIN_CONN_INTERVAL 80
|
||||
#define DEFAULT_DESIRED_MIN_CONN_INTERVAL 8
|
||||
//#define DEFAULT_DESIRED_MIN_CONN_INTERVAL 14
|
||||
|
||||
// Maximum connection interval (units of 1.25ms, 8=10ms) if automatic
|
||||
// parameter update request is enabled
|
||||
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 80
|
||||
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 40
|
||||
//#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 25
|
||||
|
||||
#endif // FEATURE_OAD
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
#include "hal_types.h"
|
||||
#include "ble_user_config.h"
|
||||
#include <ti/drivers/rf/rf.h>
|
||||
#include <ti/drivers/rf/RF.h>
|
||||
|
||||
#if defined(BLE_V42_FEATURES) && (BLE_V42_FEATURES & SECURE_CONNS_CFG)
|
||||
#include "ecc/ECCROMCC26XX.h"
|
||||
|
||||
Reference in New Issue
Block a user