Tool/software: Code Composer Studio
Hello,
i am having a connection between my CC2650 sensortag and Linux sending accelerometer data.
The standard minimum interval for sending/reading the sensors is 100ms. I tried to lower it to 10ms to achieve a frequency of 100 Hertz, which I really need for my thesis.
I adapted the firmware as follows:
Sensortag.c
// How often to perform periodic event (in milliseconds)
#define ST_PERIODIC_EVT_PERIOD 10 //before 1000
// What is the advertising interval when device is discoverable
// (units of 625us, 160=100ms)
#define DEFAULT_ADVERTISING_INTERVAL 40 //before 160
// General discoverable mode advertises indefinitely
#define DEFAULT_DISCOVERABLE_MODE GAP_ADTYPE_FLAGS_LIMITED
// Minimum connection interval (units of 1.25ms, 80=100ms) if automatic
// parameter update request is enabled
#define DEFAULT_DESIRED_MIN_CONN_INTERVAL 8 //before 8
// Maximum connection interval (units of 1.25ms, 800=1000ms) if automatic
// parameter update request is enabled
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 8
// Slave latency to use if automatic parameter update request is enabled
#define DEFAULT_DESIRED_SLAVE_LATENCY 0
// Supervision timeout value (units of 10ms, 1000=10s) if automatic parameter
// update request is enabled
#define DEFAULT_DESIRED_CONN_TIMEOUT 100
// Whether to enable automatic parameter update request when a
// connection is formed
#define DEFAULT_ENABLE_UPDATE_REQUEST GAPROLE_LINK_PARAM_UPDATE_WAIT_BOTH_PARAMS
// Connection Pause Peripheral time value (in seconds)
#define DEFAULT_CONN_PAUSE_PERIPHERAL 1
st_util.h
// Data readout periods (range 100 - 2550 ms)
#define SENSOR_MIN_UPDATE_PERIOD 10 // Minimum 100 milliseconds
#define SENSOR_PERIOD_RESOLUTION 10 // Resolution 10 milliseconds
sensortag_mov.c
// How often to perform sensor reads (milliseconds)
#define SENSOR_DEFAULT_PERIOD 10
But still I receive the sensor data every 100ms after I request it. I am using bluepy/bluez and I thought this must be the limiting problem. Or did I forget to change something in the firmware?
Thank you very much!