Updated pin settings for new board

This commit is contained in:
DragonflyPS 2024-03-19 08:27:04 -07:00
parent 3b6178d178
commit a575703db0
3 changed files with 7 additions and 16 deletions

View File

@ -13,7 +13,7 @@
//CC_Charger Timing:
#define CLK_PIN 6
#define LIMIT_PIN 9
#define BLANKING_PIN 15
#define BLANKING_PIN 13
//CC_Charger Control:
#define CC_CHARGER_EN_PIN 5
@ -25,11 +25,11 @@
#define GATE_BIAS_CLK_PIN 3
//PWM Voltage Sets:
#define CC_I_LIMIT_PIN 13
#define V_CAP_SET_PIN 12
#define CC_I_LIMIT_PIN 15
#define V_CAP_SET_PIN 14
//Telemetry:
#define VSENSE_TRIP_PIN 11
#define VSENSE_TRIP_PIN 12
PIO pio;

View File

@ -12,7 +12,7 @@
//OUTPUT PULSE PARAMETERS (times in usecs)
#define OUTPUT_ON_TIME 32
#define OUTPUT_OFF_TIME 512
#define ISO_PULSE true
#define ISO_PULSE false
#define CAP_VOLTAGE_SETPOINT 65
//CC Charger Parameters (don't change unless you know what you're doing)

View File

@ -5,12 +5,10 @@
#include "hardware/adc.h"
#define OUTPUT_EN_PIN 2
#define OUTPUT_CURRENT_TRIP_PIN 10
#define SPARK_THRESHOLD_PWM_PIN 14
#define OUTPUT_CURRENT_TRIP_PIN 11
#define SPARK_THRESHOLD_PWM_PIN 10
#define SHORT_ALERT_PIN 1
#define PULSE_COUNTER_PWM_PIN 24
#define CAP_VSENSE_PIN 27
#define SHORT_THRESHOLD 513
@ -150,8 +148,6 @@ int64_t begin_off_time(alarm_id_t id, void *user_data){
gpio_put(SHORT_ALERT_PIN, true);
}
pwm_set_gpio_level(PULSE_COUNTER_PWM_PIN, pulse_counter<<2);
return 0;
}
@ -206,11 +202,6 @@ void pulse_generator_init(uint32_t trip_current) {
pwm_set_enabled(pwm_gpio_to_slice_num(SPARK_THRESHOLD_PWM_PIN), true);
gpio_set_function(PULSE_COUNTER_PWM_PIN, GPIO_FUNC_PWM);
pwm_set_wrap(pwm_gpio_to_slice_num(PULSE_COUNTER_PWM_PIN), 2500);
pwm_set_enabled(pwm_gpio_to_slice_num(PULSE_COUNTER_PWM_PIN), true);
gpio_add_raw_irq_handler(OUTPUT_CURRENT_TRIP_PIN, &output_current_trip_irq);
adc_gpio_init(CAP_VSENSE_PIN);