Skip to content

Commit

Permalink
Bracelet: power management for FCS hardware design
Browse files Browse the repository at this point in the history
  • Loading branch information
lyusupov committed Aug 25, 2021
1 parent 23ad286 commit ea0af07
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Model(s)|Platform|First appearance|       Sta
1&nbsp;[**Prime Mark II**](https://github.com/lyusupov/SoftRF/wiki/Prime-Edition-MkII)<br>2&nbsp;[**Standalone**](https://github.com/lyusupov/SoftRF/wiki/Standalone-Edition) + [adapter](https://github.com/lyusupov/ESP32-NODEMCU-ADAPTER)<br>3&nbsp;[UAV](https://github.com/lyusupov/SoftRF/wiki/UAV-Edition)<br>4&nbsp;[**SkyView EZ**](https://github.com/lyusupov/SoftRF/wiki/SkyView-EZ)<br>5&nbsp;[Flight Recorder](https://github.com/lyusupov/SoftRF/wiki/Flight-Recorder)|[Espressif<br>ESP32](https://en.wikipedia.org/wiki/ESP32)|Q1 2018|![](https://via.placeholder.com/140x70/00A000/000000?text=Good)|Today's best platform
1&nbsp;[**Raspberry Edition**](https://github.com/lyusupov/SoftRF/wiki/Raspberry-Edition)<br>2&nbsp;[**SkyView Pi**](https://github.com/lyusupov/SoftRF/wiki/SkyView-Pi)|[Broadcom<br>BCM283X<br>(Raspberry Pi)](https://en.wikipedia.org/wiki/Raspberry_Pi)|Q4 2018|![](https://via.placeholder.com/140x70/00A000/000000?text=Good)|Good for use together with RTL-SDR dongles to achieve additional 1090ES (and 978UAT) ADS-B air traffic reception.
1&nbsp;[UAT module](https://github.com/lyusupov/UAT-test-signal#variant-2-advanced)<br>2&nbsp;[**Uni**](https://github.com/lyusupov/SoftRF/wiki/Uni-Edition)|[Texas Instruments<br>CC1310](http://www.ti.com/product/CC1310) and [CC1352R](http://www.ti.com/product/CC1352R)|Q1 2019|![](https://via.placeholder.com/140x70/00A000/000000?text=Good)<!-- ![](https://via.placeholder.com/140x70/FFFF00/000000?text=In+progress) -->|1&nbsp;Unique RF radio specs are useful for [UAT reception](https://github.com/lyusupov/SoftRF/tree/master/software/firmware/source/UATbridge) [ [1](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/uat-normal-7.jpg) , [2](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/uat-normal-8.jpg) , [3](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/uat-normal-6.jpg) ] ; <br>2&nbsp;holds [**FCC/CE** mark](https://github.com/lyusupov/SoftRF/wiki/Uni-Edition#certificates)
1&nbsp;[**Dongle**](https://github.com/lyusupov/SoftRF/wiki/Dongle-Edition)<br>2&nbsp;[Retro](https://github.com/lyusupov/SoftRF/wiki/Retro-Edition)|[STMicroelectronics<br>STM32](https://en.wikipedia.org/wiki/STM32)|Q3 2019|![](https://via.placeholder.com/140x70/00A000/000000?text=Good)<!-- ![](https://via.placeholder.com/140x70/FFFF00/000000?text=In+progress)-->|[AcSiP **S76G**](http://www.acsip.com.tw/index.php?action=products-detail&fid1=19&fid2=&fid3=&id=41&lang=3) "3-in-1" system-in-package is doing good [ [1](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/watch-1.jpg) , [2](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/t-motion-4.jpg) , [3](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/t-motion-5.jpg) ] .<br>As well as STM32F103C8 "**Blue Pill**" (same MCU that [STM32 OGN tracker](http://wiki.glidernet.org/stm32-ogn-tracker) uses) [ [4](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/stm32_breadboard.jpg) , [5](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/stm32_ognweb_1.JPG) ] .
1&nbsp;**Bracelet**<br>2&nbsp;[**Dongle**](https://github.com/lyusupov/SoftRF/wiki/Dongle-Edition)<br>3&nbsp;[Retro](https://github.com/lyusupov/SoftRF/wiki/Retro-Edition)|[STMicroelectronics<br>STM32](https://en.wikipedia.org/wiki/STM32)|Q3 2019|![](https://via.placeholder.com/140x70/00A000/000000?text=Good)<!-- ![](https://via.placeholder.com/140x70/FFFF00/000000?text=In+progress)-->|[AcSiP **S76G**](http://www.acsip.com.tw/index.php?action=products-detail&fid1=19&fid2=&fid3=&id=41&lang=3) "3-in-1" system-in-package is doing good [ [1](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/watch-1.jpg) , [2](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/t-motion-4.jpg) , [3](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/t-motion-5.jpg) ] .<br>As well as STM32F103C8 "**Blue Pill**" (same MCU that [STM32 OGN tracker](http://wiki.glidernet.org/stm32-ogn-tracker) uses) [ [4](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/stm32_breadboard.jpg) , [5](https://raw.githubusercontent.com/lyusupov/SoftRF/master/documents/images/stm32_ognweb_1.JPG) ] .
[**Mini**](https://github.com/lyusupov/SoftRF/wiki/Mini-Edition)|[Cypress<br>PSoC 4100**S**](https://en.wikipedia.org/wiki/Cypress_PSoC)|Q3 2020|![](https://via.placeholder.com/140x40/c5f015/000000?text=May+need)<br>![](https://via.placeholder.com/140x40/c5f015/000000?text=improvements)|1&nbsp;good add-on candidate for modded Kobo e-Readers ;<br>2&nbsp;holds [**FCC/CE** mark](https://github.com/lyusupov/SoftRF/wiki/Mini-Edition#certificates)
[**Badge**](https://github.com/lyusupov/SoftRF/wiki/Badge-Edition)&nbsp;![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)|[Nordic Semiconductor<br>nRF52840](https://www.nordicsemi.com/Products/Low-power-short-range-wireless/nRF52840)|Q4 2020|![](https://via.placeholder.com/140x40/c5f015/000000?text=May+need)<br>![](https://via.placeholder.com/140x40/c5f015/000000?text=improvements)|&nbsp;
ES|[NXP Semiconductors<br>LPC4320](https://en.wikipedia.org/wiki/NXP_LPC#LPC4000_series)|Q2 2021|![](https://via.placeholder.com/140x70/FFFF00/000000?text=In+progress)
Expand Down
17 changes: 16 additions & 1 deletion software/firmware/source/SoftRF/src/platform/STM32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,13 @@ static void STM32_setup()
hw_info.model = SOFTRF_MODEL_DONGLE;
stm32_board = STM32_TTGO_TMOTION_1_1;

// pinMode(TTGO_T65_OLED_PIN_RST, INPUT_PULLUP); /* LP modded early rev. */

pinMode(TTGO_T65_VDD_1V8_EN, INPUT_PULLUP);
delay(150);
pinMode(TTGO_T65_GPS_PWR_DIS, INPUT_PULLDOWN);
delay(50);

Wire.begin();
Wire.beginTransmission(ICM20948_ADDRESS);
STM32_has_IMU = (Wire.endTransmission() == 0);
Expand All @@ -194,6 +201,9 @@ static void STM32_setup()
}

pinMode(TTGO_T65_OLED_PIN_RST, INPUT_PULLDOWN);
} else {
pinMode(TTGO_T65_VDD_1V8_EN, INPUT_ANALOG);
pinMode(TTGO_T65_GPS_PWR_DIS, INPUT_ANALOG);
}
}

Expand Down Expand Up @@ -249,9 +259,14 @@ static void STM32_setup()

HAL_NVIC_SystemReset();
break;
#endif
#endif /* USE_SERIAL_DEEP_SLEEP */
case SOFTRF_SHUTDOWN_BUTTON:
case SOFTRF_SHUTDOWN_LOWBAT:
if (hw_info.model == SOFTRF_MODEL_BRACELET) {
pinMode(TTGO_T65_GPS_PWR_DIS, INPUT_PULLUP);
pinMode(TTGO_T65_VDD_1V8_EN, INPUT_PULLDOWN);
}

if (SOC_GPIO_PIN_BUTTON != SOC_UNUSED_PIN) {
pinMode(SOC_GPIO_PIN_BUTTON, hw_info.model == SOFTRF_MODEL_DONGLE ?
INPUT_PULLDOWN : INPUT);
Expand Down
4 changes: 3 additions & 1 deletion software/firmware/source/SoftRF/src/platform/STM32.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,10 @@ typedef struct stm32_backup_struct {
#define TTGO_T65_OLED_PIN_RST PA8
#define TTGO_T65_GPIO_PAD_OUT PA0
#define TTGO_T65_GPIO_PAD_PWR PA2
#define TTGO_T65_SENSOR_INT PB0
#define TTGO_T65_SENSOR_INT PB1 // PB0
#define TTGO_T65_GPIO_CHRG PB8
#define TTGO_T65_VDD_1V8_EN PB0 /* HIGH - enable 1.8V power supply */
#define TTGO_T65_GPS_PWR_DIS PA3 /* HIGH - disable GNSS and LS power supply */

/* button */
//#define SOC_GPIO_PIN_BUTTON SOC_UNUSED_PIN
Expand Down

0 comments on commit ea0af07

Please sign in to comment.