|
@@ -5,7 +5,7 @@
|
|
|
#include "bsp/clock.h"
|
|
#include "bsp/clock.h"
|
|
|
#include "bsp/gpio.h"
|
|
#include "bsp/gpio.h"
|
|
|
#include "bsp/temp_lookup_tab.h"
|
|
#include "bsp/temp_lookup_tab.h"
|
|
|
-/* measure the current & voltage for battery pack by using
|
|
|
|
|
|
|
+/* measure the temp & current & voltage for battery pack by using
|
|
|
* ms5238 & cs1180(only used when bms is in small current loading)
|
|
* ms5238 & cs1180(only used when bms is in small current loading)
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
@@ -19,7 +19,7 @@ static float vim0_10x = 0.0f;
|
|
|
static float vim0_50x = 0.0f;
|
|
static float vim0_50x = 0.0f;
|
|
|
static float vim0_now;
|
|
static float vim0_now;
|
|
|
#define r_resistor 1.0f // 1ºÁÅ·
|
|
#define r_resistor 1.0f // 1ºÁÅ·
|
|
|
-#define r_pcb_resistor 2.0f // pcb resistor
|
|
|
|
|
|
|
+#define r_pcb_resistor 0.0f // pcb resistor
|
|
|
static const float r_sense = r_resistor + r_pcb_resistor;
|
|
static const float r_sense = r_resistor + r_pcb_resistor;
|
|
|
static const float v_ref = 3300.0f; //adc ref = 3.3v
|
|
static const float v_ref = 3300.0f; //adc ref = 3.3v
|
|
|
static const float max_adc = 65535.0f;
|
|
static const float max_adc = 65535.0f;
|