test3 beta ver1.3
This commit is contained in:
parent
56d544bb8b
commit
dbd040fb8d
17 changed files with 12505 additions and 12495 deletions
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
3091
bthome_phy6222/bin/BOOT_BTH01_v13.hex
Normal file
3091
bthome_phy6222/bin/BOOT_BTH01_v13.hex
Normal file
File diff suppressed because it is too large
Load diff
3154
bthome_phy6222/bin/BOOT_TH05_v13.hex
Normal file
3154
bthome_phy6222/bin/BOOT_TH05_v13.hex
Normal file
File diff suppressed because it is too large
Load diff
3151
bthome_phy6222/bin/BOOT_THB1_v13.hex
Normal file
3151
bthome_phy6222/bin/BOOT_THB1_v13.hex
Normal file
File diff suppressed because it is too large
Load diff
3088
bthome_phy6222/bin/BOOT_THB2_v13.hex
Normal file
3088
bthome_phy6222/bin/BOOT_THB2_v13.hex
Normal file
File diff suppressed because it is too large
Load diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -53,7 +53,7 @@ const cfg_t def_cfg = {
|
|||
.advertising_interval = 80, // 80 * 62.5 = 5000 ms
|
||||
.measure_interval = 2, // 5 * 2 = 10 sec
|
||||
.batt_interval = 60, // 60 sec
|
||||
.connect_latency = 29, // 30*30 = 900 ms
|
||||
.connect_latency = DEFAULT_DESIRED_SLAVE_LATENCY, // 30*(29+1) = 900 ms
|
||||
.averaging_measurements = 180 // 180*10 = 1800 sec, 30 min
|
||||
};
|
||||
|
||||
|
|
@ -93,16 +93,23 @@ void test_config(void) {
|
|||
cfg.rf_tx_power = RF_PHY_TX_POWER_EXTRA_MAX;
|
||||
g_rfPhyTxPower = cfg.rf_tx_power;
|
||||
rf_phy_set_txPower(g_rfPhyTxPower);
|
||||
|
||||
#if FIX_CONN_INTERVAL
|
||||
gapRole_MinConnInterval = periConnParameters.intervalMin = DEFAULT_DESIRED_MIN_CONN_INTERVAL;
|
||||
gapRole_MaxConnInterval = periConnParameters.intervalMax = DEFAULT_DESIRED_MAX_CONN_INTERVAL;
|
||||
gapRole_SlaveLatency = periConnParameters.latency = cfg.connect_latency;
|
||||
|
||||
periConnParameters.timeout = (cfg.connect_latency + 1) * 3 * 4;
|
||||
if(periConnParameters.timeout > 2048)
|
||||
periConnParameters.timeout = 2048; // 20.48 sec мax
|
||||
gapRole_TimeoutMultiplier = periConnParameters.timeout;
|
||||
|
||||
gapRole_TimeoutMultiplier = (cfg.connect_latency + 1) * 3 * 4;
|
||||
if(gapRole_TimeoutMultiplier > 2048)
|
||||
gapRole_TimeoutMultiplier = 2048; // 20.48 sec мax
|
||||
periConnParameters.timeout = gapRole_TimeoutMultiplier;
|
||||
#else
|
||||
gapRole_MinConnInterval = DEFAULT_DESIRED_MIN_CONN_INTERVAL;
|
||||
gapRole_MaxConnInterval = DEFAULT_DESIRED_MAX_CONN_INTERVAL;
|
||||
gapRole_SlaveLatency = cfg.connect_latency;
|
||||
gapRole_TimeoutMultiplier = (cfg.connect_latency + 1) * 3 * 4;
|
||||
if(gapRole_TimeoutMultiplier > 2048)
|
||||
gapRole_TimeoutMultiplier = 2048; // 20.48 sec мax
|
||||
#endif
|
||||
if(cfg.advertising_interval == 0)
|
||||
cfg.advertising_interval = 1;
|
||||
else if(cfg.advertising_interval > 160)
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@
|
|||
// Maximum connection interval (units of 1.25ms, 800=1000ms) if automatic parameter update request is enabled
|
||||
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 24 // 30 ms
|
||||
// Slave latency to use if automatic parameter update request is enabled
|
||||
#define DEFAULT_DESIRED_SLAVE_LATENCY 0 // (29+1)*30 = 900 ms
|
||||
#define DEFAULT_DESIRED_SLAVE_LATENCY 29 // (29+1)*30 = 900 ms
|
||||
// Supervision timeout value (units of 10ms, 1000=10s) if automatic parameter update request is enabled
|
||||
#define DEFAULT_DESIRED_CONN_TIMEOUT 400 // 4s
|
||||
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ const ioinit_cfg_t ioInit[] = {
|
|||
#endif
|
||||
DCDC_CONFIG_SETTING(0x0a);
|
||||
DCDC_REF_CLK_SETTING(1);
|
||||
DIG_LDO_CURRENT_SETTING(0x01);
|
||||
DIG_LDO_CURRENT_SETTING(1);
|
||||
#if defined ( __GNUC__ )
|
||||
extern uint32 g_irqstack_top;
|
||||
// Check IRQ STACK (1KB) location
|
||||
|
|
@ -394,6 +394,7 @@ int main(void) {
|
|||
wrk.boot_flg = (uint8_t)read_reg(OTA_MODE_SELECT_REG);
|
||||
#if defined(OTA_TYPE) && OTA_TYPE == OTA_TYPE_BOOT
|
||||
#if (DEV_SERVICES & SERVICE_KEY)
|
||||
hal_gpio_pin_init(GPIO_KEY, IE);
|
||||
if (hal_gpio_read(GPIO_KEY) == 0
|
||||
|| wrk.boot_flg == BOOT_FLG_OTA
|
||||
|| wrk.boot_flg == BOOT_FLG_FW0) {
|
||||
|
|
|
|||
|
|
@ -809,7 +809,11 @@ static void peripheralStateReadRssiCB( int8_t rssi )
|
|||
LOG("Gaprole_Disconnection\n");
|
||||
osal_stop_timerEx(simpleBLEPeripheral_TaskID, TIMER_BATT_EVT);
|
||||
bthome_data_beacon((void *) gapRole_AdvertData);
|
||||
#if FIX_CONN_INTERVAL
|
||||
gapRole_SlaveLatency = periConnParameters.latency = cfg.connect_latency;
|
||||
#else
|
||||
gapRole_SlaveLatency = cfg.connect_latency;
|
||||
#endif
|
||||
adv_wrk.adv_event = 0;
|
||||
adv_wrk.adv_count = 0;
|
||||
adv_wrk.adv_reload_count = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue