diff options
author | jaseg <git@jaseg.net> | 2019-05-19 14:43:58 +0900 |
---|---|---|
committer | jaseg <git@jaseg.net> | 2019-05-19 14:56:53 +0900 |
commit | 3cba41f49f2d91a13addea0004f7c91292d4d3e0 (patch) | |
tree | bd54c3c483902c8a25e651a44abb03f1242ebdef /driver_fw | |
parent | beaff00ee905a507727195e67ab828a19516047c (diff) | |
download | 8seg-3cba41f49f2d91a13addea0004f7c91292d4d3e0.tar.gz 8seg-3cba41f49f2d91a13addea0004f7c91292d4d3e0.tar.bz2 8seg-3cba41f49f2d91a13addea0004f7c91292d4d3e0.zip |
Add mounting structure simulation
Diffstat (limited to 'driver_fw')
-rw-r--r-- | driver_fw/ina226.c | 2 | ||||
-rw-r--r-- | driver_fw/main.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/driver_fw/ina226.c b/driver_fw/ina226.c index d73703b..c740125 100644 --- a/driver_fw/ina226.c +++ b/driver_fw/ina226.c @@ -5,7 +5,7 @@ void ina226_init() { /* FIXME plug in final values for I meas backchannel */ - uint16_t config = INA226_CONFIG_AVG_128 | INA226_CONFIG_VBUSCT_204u | INA226_CONFIG_VSHCT_1m1 | + uint16_t config = INA226_CONFIG_AVG_1 | INA226_CONFIG_VBUSCT_204u | INA226_CONFIG_VSHCT_4m156 | INA226_CONFIG_MODE_SHUNT | INA226_CONFIG_MODE_BUS | INA226_CONFIG_MODE_CONT; ina226_write_reg(INA226_REG_CONFIG, config); diff --git a/driver_fw/main.c b/driver_fw/main.c index ef01bfb..30ff633 100644 --- a/driver_fw/main.c +++ b/driver_fw/main.c @@ -189,7 +189,7 @@ int main(void) { TIM3->BDTR = TIM_BDTR_MOE; /* Enable timer */ TIM3->CR1 |= TIM_CR1_CEN; - /* Set f=2.5kHz/T=0.4ms */ + /* Set f=1.25kHz/T=0.8ms */ TIM3->ARR = 800-1; /* Initialize AC protocol state machine in TIM3 ISR with the AC protocol comma */ |