Skip to content

Commit

Permalink
Fix some pin issues
Browse files Browse the repository at this point in the history
  • Loading branch information
multiplemonomials committed Feb 1, 2024
1 parent a76ac34 commit 8bfe12f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion mbed-os
Submodule mbed-os updated 29 files
+4 −0 connectivity/mbedtls/tests/TESTS/mbedtls/selftest/CMakeLists.txt
+4 −0 connectivity/netsocket/tests/TESTS/netsocket/tls/CMakeLists.txt
+1 −1 drivers/device_key/tests/TESTS/device_key/functionality/CMakeLists.txt
+21 −19 drivers/usb/tests/TESTS/usb_device/README.md
+1 −1 platform/mbed_lib.json
+1 −1 platform/source/mbed_rtc_time.cpp
+3 −3 targets/TARGET_NXP/TARGET_LPC176X/device/TOOLCHAIN_GCC_ARM/LPC1768.ld
+1 −2 targets/TARGET_RASPBERRYPI/TARGET_RP2040/analogin_api.c
+21 −2 targets/TARGET_RASPBERRYPI/TARGET_RP2040/objects.h
+173 −61 targets/TARGET_RASPBERRYPI/TARGET_RP2040/pwmout_api.c
+17 −25 targets/TARGET_STM/README.md
+2 −2 targets/TARGET_STM/TARGET_STM32U5/TARGET_STM32U575xG/cmsis_nvic.h
+108 −1 targets/TARGET_STM/TARGET_STM32U5/TARGET_STM32U575xG/system_clock.c
+0 −31 targets/TARGET_STM/mbed_overrides.c
+2 −0 targets/TARGET_STM/tools/STM32_gen_PeripheralPins.py
+39 −10 targets/targets.json5
+1 −4 targets/upload_method_cfg/LPC1768.cmake
+54 −0 targets/upload_method_cfg/NUCLEO_H723ZG.cmake
+1 −1 targets/upload_method_cfg/WIO_H725AE.cmake
+193 −1 targets/upload_method_cfg/openocd_cfgs/lpc1768.cfg
+9 −0 targets/upload_method_cfg/openocd_cfgs/stm32h72x.cfg
+0 −12 targets/upload_method_cfg/openocd_cfgs/wio_h725.cfg
+5 −1 tools/cmake/mbed_greentea.cmake
+1 −1 tools/cmake/upload_methods/UploadMethodJLINK.cmake
+11 −1 tools/cmake/upload_methods/UploadMethodOPENOCD.cmake
+1 −1 tools/cmake/upload_methods/UploadMethodPYOCD.cmake
+1 −1 tools/cmake/upload_methods/UploadMethodSTLINK.cmake
+1 −1 tools/cmake/upload_methods/UploadMethodSTM32CUBE.cmake
+3 −0 tools/requirements-ci-build.apt.txt
13 changes: 5 additions & 8 deletions src/ChemIDMeasurer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,16 @@
#include "pins.h"

ChemIDMeasurer::ChemIDMeasurer():
soc(p9, p10, 100000),
acpPin(p22),
chgPin(p23),
progPin(p15),
shdnPin(p21)
i2c(BQ34_I2C_SDA, BQ34_I2C_SCL),
soc(i2c, 100000),
chgPin(ACTIVATE_CHARGER_PIN),
shdnPin(CHARGE_STATUS_PIN)
{
//Initially keep charger in shdn
shdnPin.write(1);

// Disable MCU pullup resistors as they are enough to screw with the signal value.
// Disable MCU pullup resistors
chgPin.mode(PinMode::PullNone);
acpPin.mode(PinMode::PullNone);
progPin.mode(PinMode::PullNone);
}

void ChemIDMeasurer::activateCharger()
Expand Down
3 changes: 1 addition & 2 deletions src/ChemIDMeasurer.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@

class ChemIDMeasurer
{
I2C i2c;
BQ34Z100 soc;

// charger control pins
DigitalIn acpPin;
DigitalIn chgPin;
DigitalIn progPin;
DigitalOut shdnPin;

Timer totalTimer;
Expand Down
2 changes: 1 addition & 1 deletion src/SOCTestSuite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <cinttypes>

I2C i2c(I2C_SDA, I2C_SCL);
I2C i2c(BQ34_I2C_SDA, BQ34_I2C_SCL);
BQ34Z100 soc(i2c, 100000);

DigitalIn chgPin(CHARGE_STATUS_PIN);
Expand Down
4 changes: 2 additions & 2 deletions src/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#define BQ34Z100G1_UTILS_PINS_H

// Change these pin names to match how the BQ34 is connected on your processor
#define I2C_SDA PB_9
#define I2C_SCL PB_8
#define BQ34_I2C_SDA PB_9
#define BQ34_I2C_SCL PB_8

// Pin which activates the charger. Used for the Chem ID Measurer and some other tests
#define ACTIVATE_CHARGER_PIN PF_1
Expand Down

0 comments on commit 8bfe12f

Please sign in to comment.