Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
2c0d86c
Support boards without VBUS pin again
matthijskooijman Dec 2, 2020
c47898a
Do no set up VBUS pin mode in init()
matthijskooijman Mar 1, 2021
553143d
Support boards with a voltage divider on VBUS
matthijskooijman Mar 1, 2021
3d47e60
Disable USB pullup when stopping USB
matthijskooijman Dec 5, 2020
2f64e7d
Merge pull request #5 from matthijskooijman/vbus-support
UT2UH Jan 25, 2022
46ab52c
Merge pull request #6 from matthijskooijman/disable-usb-pullups
UT2UH Jan 25, 2022
b1227c0
LGT92, T-Impulse Wristband support added
UT2UH Jan 25, 2022
b3b3e09
T-Impulse cleanup
UT2UH Feb 3, 2022
d5e2a5c
K48, K52, K76 boards support added
UT2UH May 27, 2022
d2bb5fc
Variant files cleanup for K52
UT2UH Jun 19, 2022
4ab8740
Recompiled binaries for no VBUS support and USB pullup disable
fronders Jun 20, 2022
a84a0d6
Merge branch 'Trackers' into VBUS
fronders Jun 20, 2022
61abf8d
Merge pull request #7 from UT2UH/VBUS
fronders Jun 20, 2022
62788ad
Recompiled binaries after merge conflict
fronders Jun 20, 2022
ad3479d
S76S support and cleanups
UT2UH Aug 24, 2022
625cd5d
added docker VSCode config for Arduino Core recompiling
fronders Aug 25, 2022
72a99e5
added .gitattributes
UT2UH Aug 25, 2022
0dc7aef
Boards Init files cleanup
UT2UH Aug 26, 2022
230bcbf
Boards initialize trials cleaanup
UT2UH Aug 29, 2022
6586a52
updated VSCode settings for Arduino Core recompiling
fronders Sep 7, 2022
41ae543
variant cleanup
fronders Sep 8, 2022
4ac1a4c
updated boards.txt USB settings
fronders Sep 8, 2022
714cc1b
fixed board init files (radio init functions)
fronders Sep 8, 2022
70a82eb
updated variant files to use new board radio init functions, fixed S7…
fronders Sep 8, 2022
edf60b3
added debugger SVD scripts
fronders Sep 15, 2022
df3f82b
updated dfu-util to latest (v0.11)
fronders Sep 15, 2022
76a4a73
updated win openocd and scripts to ST port v0.11.0+dev-00449-g53fa0f7
fronders Sep 15, 2022
d3dcc9f
updated K48-S76G variant openocd script
fronders Sep 15, 2022
1e6e3fd
fixed K48-S76G variant openocd script
UT2UH Sep 15, 2022
3aba3bb
openocd scripts cleanup
UT2UH Sep 15, 2022
9044f14
Boards cleanup
UT2UH Dec 23, 2022
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
Prev Previous commit
Next Next commit
T-Impulse cleanup
  • Loading branch information
UT2UH committed Feb 3, 2022
commit b3b3e0967b1c3bb76f51bad9e7a94c78acf50b83
13 changes: 8 additions & 5 deletions variants/T-IMPULSE-S76G/variant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,10 @@ extern const PinDescription g_APinDescription[PINS_COUNT] =
{ GPIOB, STM32L0_GPIO_PIN_MASK(STM32L0_GPIO_PIN_PB7), STM32L0_GPIO_PIN_PB7, 0, PWM_INSTANCE_NONE, PWM_CHANNEL_NONE, ADC_CHANNEL_NONE }, //SDA
{ GPIOB, STM32L0_GPIO_PIN_MASK(STM32L0_GPIO_PIN_PB6), STM32L0_GPIO_PIN_PB6, 0, PWM_INSTANCE_NONE, PWM_CHANNEL_NONE, ADC_CHANNEL_NONE }, //SCL
// 16 - Analog pin
{ GPIOC, STM32L0_GPIO_PIN_MASK(STM32L0_GPIO_PIN_PC4), STM32L0_GPIO_PIN_PC4, (PIN_ATTR_EXTI), PWM_INSTANCE_NONE, PWM_CHANNEL_NONE, ADC_CHANNEL_14 }, //BAT_VOL_DET
// 17..21 - Special pins (USB_DM, USB_DP, no USB_VBUS, SWD)
{ GPIOC, STM32L0_GPIO_PIN_MASK(STM32L0_GPIO_PIN_PC4), STM32L0_GPIO_PIN_PC4, (PIN_ATTR_EXTI), PWM_INSTANCE_NONE, PWM_CHANNEL_NONE, ADC_CHANNEL_14 }, //PIN_VBAT
// 17..18 - Special pins (USB_DM, USB_DP)
{ NULL, STM32L0_GPIO_PIN_MASK(STM32L0_GPIO_PIN_PA11), STM32L0_GPIO_PIN_PA11, (PIN_ATTR_EXTI), PWM_INSTANCE_NONE, PWM_CHANNEL_NONE, ADC_CHANNEL_NONE }, //DM
{ NULL, STM32L0_GPIO_PIN_MASK(STM32L0_GPIO_PIN_PA12), STM32L0_GPIO_PIN_PA12, (PIN_ATTR_EXTI), PWM_INSTANCE_NONE, PWM_CHANNEL_NONE, ADC_CHANNEL_NONE }, //DP
{ NULL, 0, STM32L0_GPIO_PIN_NONE, 0, PWM_INSTANCE_NONE, PWM_CHANNEL_NONE, ADC_CHANNEL_NONE }, //VBUS_USB
{ GPIOA, STM32L0_GPIO_PIN_MASK(STM32L0_GPIO_PIN_PA13), STM32L0_GPIO_PIN_PA13, (PIN_ATTR_SWD | PIN_ATTR_EXTI), PWM_INSTANCE_NONE, PWM_CHANNEL_NONE, ADC_CHANNEL_NONE }, //SWCLK
{ GPIOA, STM32L0_GPIO_PIN_MASK(STM32L0_GPIO_PIN_PA14), STM32L0_GPIO_PIN_PA14, (PIN_ATTR_SWD | PIN_ATTR_EXTI), PWM_INSTANCE_NONE, PWM_CHANNEL_NONE, ADC_CHANNEL_NONE }, //SWDIO
};

static uint8_t stm32l0_usart4_rx_fifo[32];
Expand Down Expand Up @@ -94,13 +91,16 @@ extern const stm32l0_i2c_params_t g_WireParams = {
},
};

extern stm32l0_i2c_t g_Wire;

void RadioInit( const RadioEvents_t *events, uint32_t freq )
{
SX1276Init(events, freq);
}

void initVariant()
{
//S76G_Initialize(STM32L0_GPIO_PIN_PD7, STM32L0_GPIO_PIN_NONE);
// Enable 1V8 Power Switch
stm32l0_gpio_pin_configure(STM32L0_GPIO_PIN_PB0, (STM32L0_GPIO_PARK_NONE | STM32L0_GPIO_PUPD_NONE | STM32L0_GPIO_OSPEED_LOW | STM32L0_GPIO_OTYPE_PUSHPULL | STM32L0_GPIO_MODE_OUTPUT));
stm32l0_gpio_pin_write(STM32L0_GPIO_PIN_PB0, 1);
Expand Down Expand Up @@ -129,6 +129,9 @@ void initVariant()
// Set Ant Rx/Tx switch to Rx Mode
stm32l0_gpio_pin_configure(STM32L0_GPIO_PIN_PA1, (STM32L0_GPIO_PARK_NONE | STM32L0_GPIO_PUPD_NONE | STM32L0_GPIO_OSPEED_LOW | STM32L0_GPIO_OTYPE_PUSHPULL | STM32L0_GPIO_MODE_OUTPUT));
stm32l0_gpio_pin_write(STM32L0_GPIO_PIN_PA1, 1);
// Disable TCXO_EN pin
//stm32l0_gpio_pin_configure(STM32L0_GPIO_PIN_PD7, (STM32L0_GPIO_PARK_NONE | STM32L0_GPIO_PUPD_NONE | STM32L0_GPIO_OSPEED_LOW | STM32L0_GPIO_OTYPE_PUSHPULL | STM32L0_GPIO_MODE_OUTPUT));
//stm32l0_gpio_pin_write(STM32L0_GPIO_PIN_PD7, 0);
// Configure RESET as input
stm32l0_gpio_pin_configure(STM32L0_GPIO_PIN_PB10, (STM32L0_GPIO_PARK_NONE | STM32L0_GPIO_MODE_ANALOG));
armv6m_core_udelay(6000); // Wait 6 ms
Expand Down
25 changes: 12 additions & 13 deletions variants/T-IMPULSE-S76G/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@
#define STM32L0_CONFIG_PIN_VBAT STM32L0_GPIO_PIN_PC4
#define STM32L0_CONFIG_CHANNEL_VBAT STM32L0_ADC_CHANNEL_14
#define STM32L0_CONFIG_VBAT_PERIOD 40
#define STM32L0_CONFIG_VBAT_SCALE ((float)1.27)
#define STM32L0_CONFIG_VBAT_SCALE ((float)2.08)

#define STM32L0_CONFIG_PIN_GNSS_ENABLE STM32L0_GPIO_PIN_PA3
#define STM32L0_CONFIG_PIN_LEV_SHIFT_EN STM32L0_GPIO_PIN_PC6
#define STM32L0_CONFIG_PIN_LSHIFTER_EN STM32L0_GPIO_PIN_PC6
#define STM32L0_CONFIG_PIN_GNSS_PPS STM32L0_GPIO_PIN_PB5
#define STM32L0_CONFIG_PIN_GNSS_RX STM32L0_GPIO_PIN_PC11_USART4_RX
#define STM32L0_CONFIG_PIN_GNSS_TX STM32L0_GPIO_PIN_PC10_USART4_TX
#define GPS_PWR_SWITCH (2ul) //PA3
#define GPS_LEVEL_SHIFTER_EN (3ul) //PC6
#define GPS_RST (4ul) //PB2
#define GPS_RX (5ul) //PC11
#define GPS_TX (6ul) //PC10
#define GPS_PPS (7ul) //PB5
#define GPS_BAUD_RATE 115200
#define GPS_PWR_SWITCH (2ul)
#define GPS_LEVEL_SHIFTER_EN (3ul)
#define GPS_RST (4ul)
#define GPS_RX (5ul)
#define GPS_TX (6ul)
#define GPS_PPS (7ul)
#define GPS_BAUD_RATE 115200

#define USBCON

Expand All @@ -81,15 +81,16 @@ extern "C"
*----------------------------------------------------------------------------*/

// Number of pins defined in PinDescription array
#define PINS_COUNT (22u)
#define NUM_DIGITAL_PINS (21u)
#define PINS_COUNT (19u)
#define NUM_DIGITAL_PINS (18u)
#define NUM_ANALOG_INPUTS (1u)
#define NUM_ANALOG_OUTPUTS (0u)

/*
* Analog pins
*/
#define PIN_A0 (16ul)
#define PIN_VBAT (16ul)

static const uint8_t A0 = PIN_A0;

Expand Down Expand Up @@ -132,8 +133,6 @@ static const uint8_t SCL = PIN_WIRE_SCL;
*/
#define PIN_USB_DM (17ul)
#define PIN_USB_DP (18ul)
#define PIN_USB_VBUS (19ul)


#ifdef __cplusplus
}
Expand Down