Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug ripple m #125

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ default_envs = NUCLEO-F103RE-ch4-aht-ap
debug_port = /dev/ttyACM0
check_tool = cppcheck
check_flags = --enable=all
upload_protocol = jlink
#RB: ch4 & AHT
[env:NUCLEO-F103RB-ch4-aht]
platform = ststm32
Expand Down Expand Up @@ -268,4 +269,5 @@ default_envs = NUCLEO-F103RE-ch4-aht-ap
monitor_speed = 115200
debug_port = /dev/ttyACM0
check_tool = cppcheck
check_flags = --enable=all
check_flags = --enable=all
upload_protocol = jlink
5 changes: 5 additions & 0 deletions src/datalogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1082,6 +1082,11 @@ void Datalogger::powerUpSwitchableComponents()
delay(250);
enableI2C1();
enableI2C2();

debug("turn on exADC");
pinMode(ENABLE_EXADC, OUTPUT_OPEN_DRAIN);
digitalWrite(ENABLE_EXADC, HIGH);
delay(500);

debug("reset exADC");
// Reset external ADC (if it's installed)
Expand Down
4 changes: 2 additions & 2 deletions src/system/hardware.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ void setupHardwarePins()
//pinMode(PA2, OUTPUT); // USART2_TX/ADC12_IN2/TIM2_CH3
//pinMode(PA3, INPUT); // USART2_RX/ADC12_IN3/TIM2_CH4

pinMode(PC5, OUTPUT); // external ADC reset
digitalWrite(PC5, HIGH);
pinMode(EXADC_RESET, OUTPUT); // external ADC reset
digitalWrite(EXADC_RESET, HIGH);
}

int getBatteryValue()
Expand Down
6 changes: 3 additions & 3 deletions src/system/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
// extern TwoWire WireTwo;
#define WireTwo Wire1

#define SWITCHED_POWER_ENABLE PC6
#define SWITCHED_POWER_ENABLE PC5
#define SD_ENABLE_PIN PC8

#define BLE_COMMAND_MODE_PIN PB5
Expand Down Expand Up @@ -75,8 +75,8 @@
//A2-A6 work as GPIO, currently used



#define EXADC_RESET PC5
#define ENABLE_EXADC PC6
#define EXADC_RESET PA4

// Bluefruit on SPI
#define BLUEFRUIT_SPI_SCK PB13
Expand Down
6 changes: 3 additions & 3 deletions src/system/low_power.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ void hardwarePinsAlwaysOff() // not currently used
pinMode(PB15, INPUT);

pinMode(PC4, INPUT);
// pinMode(PC5, INPUT); // external ADC reset
// pinMode(PC6, INPUT); // this is the switch power pin
// pinMode(PC5, INPUT); // external ADC reset WRONG
// pinMode(PC6, INPUT); // this is the switch power pin WRONG

pinMode(PC9, INPUT);
pinMode(PC10, INPUT);
Expand Down Expand Up @@ -342,7 +342,7 @@ void restorePinDefaults()
pinMode(PC2, OUTPUT); // ADC12_IN12
pinMode(PC3, OUTPUT); // ADC12_IN13
pinMode(PC4, OUTPUT); // ADC12_IN14
pinMode(PC5, OUTPUT); // External ADC Reset (ADC_RESET_PC5)
pinMode(PC5, OUTPUT); // External ADC Reset (ADC_RESET_PC5) WRONG
pinMode(PC6, OUTPUT);
pinMode(PC7, OUTPUT);
pinMode(PC8, OUTPUT);
Expand Down