aboutsummaryrefslogtreecommitdiff
path: root/driver_fw
diff options
context:
space:
mode:
Diffstat (limited to 'driver_fw')
-rw-r--r--driver_fw/ina226.c2
-rw-r--r--driver_fw/main.c2
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 */