Compare commits

...

9 Commits

Author SHA1 Message Date
Borshin Chang 262757d609 Central_NeuLive: thres with division
10Hz and 20Hz cannot separate
     0.5mV    freq:(1 5 10 20 40 50)Hz = LED(0 0 1 1 0 0)
BUT  1-mV     freq:(2.5 4 5)Hz , LED=0
     0.375-mV freq:(7.5  15)Hz , LED=0
2020-12-02 19:08:38 +08:00
Borshin Chang 973f57f757 Central_NeuLive: thres>300k,
0.5mV    freq:(1 5 10 20 40 50)Hz = LED(0 0 1 0 0 0)
BUT  1-mV     freq:(2.5 4 5)Hz , LED=1
     0.375-mV freq:(7.5  15)Hz , LED=1
2020-12-02 16:02:19 +08:00
Borshin Chang 05d36a6f1e 12/2 before taking cali value 2020-12-02 14:11:49 +08:00
Borshin Chang fe977541f2 64-point FFT, then detect power spectrum of data, with BIR change 7 bit -> 6bit
by the way data now can be really 000~FFF then ADC_unsigned_to_signed
then go FFT
2020-12-01 18:07:55 +08:00
Borshin Chang fb543aa7b4 64-point FFT, then detect power spectrum of data,
by the way data now can be really 000~FFF then ADC_unsigned_to_signed
then go FFT
2020-12-01 17:44:54 +08:00
Borshin Chang 78720a9a7e RawData can transfer to RealData with difference CaliTable an userDefineGain
remove bugs in FFT_step (not infulence)

golden data specified !! Good result but 45,000 threshold is little bit high
2020-12-01 16:25:14 +08:00
Borshin Chang baeeafd002 RawData can transfer to RealData with difference CaliTable an userDefineGain
remove bugs in FFT_step (not infulence)
2020-12-01 15:05:19 +08:00
Borshin Chang be9084d8f1 LED can light central cDBS for "* flower" 2020-12-01 12:06:01 +08:00
Borshin Chang da1e1a54ac cDBS as central verision for "* flower" 2020-12-01 10:40:01 +08:00
5 changed files with 255 additions and 8 deletions
@@ -2,17 +2,17 @@
<launchConfiguration type="com.ti.ccstudio.debug.launchType.device.debugging">
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_DEBUGGER_PROPERTIES.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS100v3 USB Debug Probe_0/Cortex_M3_0" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot; ?&gt;&#10;&lt;PropertyValues&gt;&#10;&#10; &lt;property id=&quot;ConnectOnStartup&quot;&gt;&#10; &lt;curValue&gt;1&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;EnableInstalledBreakpoint&quot;&gt;&#10; &lt;curValue&gt;1&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;IgnoreSoftLaunchFailures&quot;&gt;&#10; &lt;curValue&gt;0&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10;&lt;/PropertyValues&gt;&#10;"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_DEBUGGER_PROPERTIES.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe/Cortex_M3_0" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot; ?&gt;&#10;&lt;PropertyValues&gt;&#10;&#10; &lt;property id=&quot;ConnectOnStartup&quot;&gt;&#10; &lt;curValue&gt;1&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;EnableInstalledBreakpoint&quot;&gt;&#10; &lt;curValue&gt;1&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;IgnoreSoftLaunchFailures&quot;&gt;&#10; &lt;curValue&gt;0&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10;&lt;/PropertyValues&gt;&#10;"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_DEBUGGER_PROPERTIES.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe_0/Cortex_M3_0" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot; ?&gt;&#10;&lt;PropertyValues&gt;&#10;&#10; &lt;property id=&quot;ConnectOnStartup&quot;&gt;&#10; &lt;curValue&gt;1&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;EnableInstalledBreakpoint&quot;&gt;&#10; &lt;curValue&gt;1&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;IgnoreSoftLaunchFailures&quot;&gt;&#10; &lt;curValue&gt;0&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10;&lt;/PropertyValues&gt;&#10;"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_DEBUGGER_PROPERTIES.CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe_0/Cortex_M3_0" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot; ?&gt;&#10;&lt;PropertyValues&gt;&#10;&#10; &lt;property id=&quot;ConnectOnStartup&quot;&gt;&#10; &lt;curValue&gt;1&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;EnableInstalledBreakpoint&quot;&gt;&#10; &lt;curValue&gt;1&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10; &lt;property id=&quot;IgnoreSoftLaunchFailures&quot;&gt;&#10; &lt;curValue&gt;0&lt;/curValue&gt;&#10; &lt;/property&gt;&#10;&#10;&lt;/PropertyValues&gt;&#10;"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROGRAM.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS100v3 USB Debug Probe_0/Cortex_M3_0" value="${build_artifact:simple_peripheral_cc2650em_app}"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROGRAM.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe/Cortex_M3_0" value="${build_artifact:simple_peripheral_cc2650em_app}"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROGRAM.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe_0/Cortex_M3_0" value="${build_artifact:simple_peripheral_cc2650em_app}"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROGRAM.CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe_0/Cortex_M3_0" value="${build_artifact:simple_peripheral_cc2650em_app}"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROJECT.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS100v3 USB Debug Probe_0/Cortex_M3_0" value="simple_peripheral_cc2650em_app"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROJECT.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe/Cortex_M3_0" value="simple_peripheral_cc2650em_app"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROJECT.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe_0/Cortex_M3_0" value="simple_peripheral_cc2650em_app"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_PROJECT.CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe_0/Cortex_M3_0" value="simple_peripheral_cc2650em_app"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.ATTR_TARGET_CONFIG" value="${target_config_active_default:simple_peripheral_cc2650em_app}"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.MRU_PROGRAM.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS100v3 USB Debug Probe_0/Cortex_M3_0" value="C:/ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\FlashROM\simple_peripheral_cc2650em_app.out"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.MRU_PROGRAM.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe/Cortex_M3_0" value="C:/ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\FlashROM\simple_peripheral_cc2650em_app.out"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.MRU_PROGRAM.C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\targetConfigs\CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe_0/Cortex_M3_0" value="C:/ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\FlashROM\simple_peripheral_cc2650em_app.out"/>
<stringAttribute key="com.ti.ccstudio.debug.debugModel.MRU_PROGRAM.CC2650F128.ccxml.Texas Instruments XDS110 USB Debug Probe_0/Cortex_M3_0" value="C:\ti\simplelink\ble_sdk_2_02_02_25\examples\cc2650em\simple_peripheral\ccs\app\FlashROM\simple_peripheral_cc2650em_app.out"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/simple_peripheral_cc2650em_app"/>
</listAttribute>
@@ -146,6 +146,7 @@ extern const PIN_Config BoardGpioInitTable[];
#define Board_GLED PIN_UNASSIGNED /* Green LED */
#define Board_RLED PIN_UNASSIGNED /* Red LED */
/* UART Board */
#define Board_UART_TX Board_BP_UART_Rx /* RXD */
#define Board_UART_RX Board_BP_UART_Tx /* TXD */
@@ -2,7 +2,9 @@
#ifndef NEU_CALI_TABLE
#define NEU_CALI_TABLE
#define BOARD_TEST
// define Device_Name if "BOARD_TEST" as default
// else find headstage ID
#define BOARD_18_04_ED_37_C6_41
typedef struct _SingleChannelCali{
uint16_t Gain[4];
@@ -9,9 +9,40 @@
#endif
#include "headstage_dbs_object.h"
#define NOT_BUF_OFFSET_INIT 8
#include "headstage_cali_table.h"
static uint8_t numFFT = 64; // user define
static uint8_t step = 32; // which is numFFT/2
static uint8_t stageFFT = 6; // which is log2(numFFT)
//static int twiddle_real[16] = {10000, 9238, 7071, 3826, 0, -3827, -7072, -9239, -10000, -9239, \
// -7072, -3827, -1, 3826, 7071, 9238};
//
//static int twiddle_imag[16] = { 0, -3827, -7072, -9239, -10000, -9239, -7072, -3827, -1, 3826, \
// 7071, 9238, 10000, 9238, 7071, 3826};
static int twiddle_real[64] = {10000, 9951, 9807, 9569, 9238, 8819, 8314, 7730, 7071, 6343, \
5555, 4713, 3826, 2902, 1950, 980, 0, -981, -1951, -2903, \
-3827, -4714, -5556, -6344, -7072, -7731, -8315, -8820, -9239, -9570, \
-9808, -9952, -10000, -9952, -9808, -9570, -9239, -8820, -8315, -7731, \
-7072, -6344, -5556, -4714, -3827, -2903, -1951, -981, -1, 980,\
1950, 2902, 3826, 4713, 5555, 6343, 7071, 7730, 8314, 8819, \
9238, 9569, 9807, 9951 };
static int twiddle_imag[64] = { 0, -981, -1951, -2903, -3827, -4714, -5556, -6344, -7072, -7731, \
-8315, -8820, -9239, -9570, -9808, -9952, -10000, -9952, -9808, -9570, \
-9239, -8820, -8315, -7731, -7072, -6344, -5556, -4714, -3827, -2903, \
-1951, -981, -1, 980, 1950, 2902, 3826, 4713, 5555, 6343, \
7071, 7730, 8314, 8819, 9238, 9569, 9807, 9951, 10000, 9951, \
9807, 9569, 9238, 8819, 8314, 7730, 7071, 6343, 5555, 4713, \
3826, 2902, 1950, 980};
static void FFT(int* pred_LFP, int* imag_LFP, int numFFT);
static void BitReverse(int* BR_Array, int numFFT);
static void CLP(int raw_data);
static int ADC_U2S( uint16_t unsigned_buff);
static uint8_t not_buf_offset = NOT_BUF_OFFSET_INIT;
static uint32_t not_time_stamp = 0;
@@ -49,10 +80,39 @@ static void headstage_neu_append_notify_data() {
return;
}
uint16_t borshin_raw;
int16_t borshin_a;
int16_t borshin_b;
uint8_t borshin_sample_rate;
int borshin_real;
int borshin_compute_data;
static uint8_t borshin_sample_count;
uint8_t not_buf[2];
not_buf[0] = (channel & 0x0F) << 4 | (spi_rxbuf[1] & 0x0F);
not_buf[1] = spi_rxbuf[2];
// Borshin FFT start here <<<<<<<<<<<<<<<<<<<<---->>>>>>>>>>>>>>>>>>>>----------------------
borshin_sample_count = !borshin_sample_count;
if (borshin_sample_count){
borshin_raw = (spi_rxbuf[1]&0x0F)<<8 | spi_rxbuf[2]; // range from [ FFF , 000 ]
borshin_a = CaliTable.Ch[channel].Gain[ rec_register_value[REC_CHANNEL_INDEX] ];
borshin_b = CaliTable.Ch[channel].Offset[ rec_register_value[REC_CHANNEL_INDEX] ];
borshin_real = (borshin_raw - 2048 - borshin_b)*1000/borshin_a; // range from +- someting [ no FFF , 000 ]
borshin_compute_data = borshin_real >> 10;
borshin_sample_rate = 2000000/10/rec_register_value[REC_ADC_CLOCK_INDEX];
// if (borshin_raw<3450&&borshin_raw>600)
// headstage_pin_output(PIN_CLP, 1);
// else
// headstage_pin_output(PIN_CLP, 0);
CLP( borshin_compute_data ); // This function input is 12-bit value
// the function will buffer 16-point then
// perform 16-point FFT.
// Afterwards, calculate sum of PSD then
// decided if HVS happened. (GPIO_4)
// Borshin FFT END here <<<<<<<<<<<<<<<<<<<<----------------------------->>>>>>>>>>>>>>>>>>>>
}
uint8_t data_size = headstage_notify_append_data(not_buf);
if (data_size >= BLE_NOT_BUFF_SIZE) {
@@ -108,3 +168,185 @@ static uint8_t headstage_notify_append_data(uint8_t *data_value) {
}
#endif // HEADSTAGE_NOTIFY_TDC4VAF2_H
/*********************************************************************
* @fn FFT
*
* @brief TI Cortex M3 doesn't have floating-point ALU, we have to do
* fixed-point FFT. And in-place FFT because lack of RAM.
*
* @param None.
*
* @return None.
*/
static void FFT(int* pred_LFP, int* imag_LFP, int numFFT){
// testing_sig = !testing_sig;
// uint8_t stageFFT = 6; // static global log2(numFFT)
int l;
int product_real, product_imag;
int upfly_real, upfly_imag;
int downfly_real, downfly_imag;
for (int i=0; i<stageFFT; i++){
l = 1<<i;
for (int j=0; j<numFFT; j+=2*l){
for (int k=0; k<l; k++){
//printf("stage = %d , butterfly_top = %d , butterfly_down = %d , twiddle[%d] \n", i, j+k, j+k+l, NFFT*(k)/2/l);
product_real = pred_LFP[j+k+l] * twiddle_real[numFFT*(k)/2/l] \
- imag_LFP[j+k+l] * twiddle_imag[numFFT*(k)/2/l];
product_imag = pred_LFP[j+k+l] * twiddle_imag[numFFT*(k)/2/l] \
+ imag_LFP[j+k+l] * twiddle_real[numFFT*(k)/2/l];
product_real = product_real/10000; // left shift number =10 which is up to Int_twiddle-factor
product_imag = product_imag/10000;
upfly_real = pred_LFP[j+k] + product_real;
upfly_imag = imag_LFP[j+k] + product_imag;
downfly_real = pred_LFP[j+k] - product_real;
downfly_imag = imag_LFP[j+k] - product_imag;
pred_LFP[j+k] = upfly_real;
imag_LFP[j+k] = upfly_imag;
pred_LFP[j+k+l] = downfly_real;
imag_LFP[j+k+l] = downfly_imag;
}
}
}
return;
}
/*********************************************************************
* @fn ADC_U2S
*
* @brief ADC sample data in 12-bit which is FFF~000, but for FFT
* it needs to be pulled back to +7FF to -7FF. These is based
* on simulation result, which is like the function ADC_ISR()
* in Ramesh or Remy's code. [ ADC_unsigned_2_signed ]
*
* @param unsigned 16-bit input
*
* @return signed 16-bit output ----_0000_0000_0000 ~ ----_1000_0000_0000
*/
static int ADC_U2S( uint16_t unsigned_buff){
// 0x0FFF ~ 0x0000 (16-bit unsigned)
int output; // 0x07FF-0x0000 ~ 0x0FFF-0x0800
// int is 32-bit 0x0000_0000
if ( unsigned_buff >= 0x00000800)
output = unsigned_buff - 0x00000800;
else
output = unsigned_buff | 0xFFFFF800;
return output;
}
/*********************************************************************
* @fn BitReverse
*
* @brief Do array Bit-Reverse before perform FFT
*
* @param None.
*
* @return None.
*/
static void BitReverse(int* BR_Array, int numFFT){
// This BIR specify for 7-bit (0000_0000 ~ 0111_1111)
uint8_t n=0;
int tmp;
// for (uint8_t i=0; i<numFFT; i++){
// n = i; // printf ("%d %d\n",i,n);
// n = (n&0x0f)<<4 | (n&0xf0)>>4; // 0123_4567 -> 4567_0123
// n = (n&0x33)<<2 | (n&0xcc)>>2; // 4567_0123 -> 6745_2301
// n = (n&0xaa)<<2 | (n&0x55)>>1; // 7856_3412 -> 7654_3210
// n = n >> 1; // 7654_3210 -> 0765_4321
// if (n>i){
// tmp = BR_Array[n];
// BR_Array[n] = BR_Array[i];
// BR_Array[i] = tmp;
// }
// }
// This BIR specify for 6-bit (0000_0000 ~ 0011_1111)
for (uint8_t i=0; i<numFFT; i++){
n = i; // printf ("%d %d\n",i,n);
n = (n&0x07)<<3 | (n)>>3; // 0012_3456 -> 0045_6123
n = (n&0x09)<<2 | (n&0x36)>>1; // 0045_6123 -> 0064_5312
n = (n&0x09)<<1 | (n&0x12)>>1 | (n&0x24); // 0064_5312 -> 0065_4321
if (n>i){
tmp = BR_Array[n];
BR_Array[n] = BR_Array[i];
BR_Array[i] = tmp;
}
}
return;
} // END Bit Reverse Order Sort
/*********************************************************************
* @fn CLP ( Closed LooP )
*
* @brief
*
* @param None.
*
* @return None.
*/
static void CLP(int signed_real_data){
int signed_buff;
static int accumu_sum;
static int x_in[64];
static int real[64];
static int imag[64];
static int count;
int abs_tmp;
// signed_buff = ADC_U2S(unsigned_real_data);
x_in[count] = signed_real_data;
real[count] = signed_real_data;
imag[count] = 0;
count++;
if (count >= numFFT){
BitReverse( real, numFFT);
FFT( real, imag, numFFT);
abs_tmp=0;
accumu_sum = 0;
for ( int i=0; i<numFFT; i++){
accumu_sum = accumu_sum + (real[i]*real[i]+imag[i]*imag[i]);
if (i>0){
if (i==1){
abs_tmp = real[i]*real[i]+imag[i]*imag[i];
}
real[i-1] = x_in[i];
imag[i-1] = 0;
x_in[i-1] = x_in[i];
}
}
int flag;
flag = abs_tmp*100/(accumu_sum>>1);
if (flag > 62 && flag < 65 ){
headstage_pin_output(PIN_CLP, 1);
}
else {
headstage_pin_output(PIN_CLP, 0);
}
// if (abs_tmp > 300000 ){
// headstage_pin_output(PIN_CLP, 1);
// }
// else {
// headstage_pin_output(PIN_CLP, 0);
// }
count--;
}
return;
}
@@ -29,7 +29,8 @@
#define PIN_LED_CLK IOID_1 // SPI1 clock
#define PIN_DC_DC IOID_2 // STI select need
#define PIN_EN_ADC_SPI_CLK IOID_3 //
#define PIN_BATT_HALF IOID_4 //
//#define PIN_BATT_HALF IOID_4 //
#define PIN_CLP IOID_4 // cDBS detect HVS LED::also added in config table
#define PIN_SPI_MISO IOID_7 //
#define PIN_SPI_MOSI IOID_8 //
#define PIN_SPI_CS IOID_9 //
@@ -77,7 +78,8 @@ static PIN_Config headstage_pin_configuration[] = { //
PIN_RESET | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
PIN_EN_ADC_SPI_CLK | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
PIN_DC_DC | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
PIN_BATT_HALF | PIN_INPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
PIN_CLP | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL, // cDBS detect HVS LED::added in config table
// 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};