Compare commits

..

14 Commits

Author SHA1 Message Date
Ben V. Brown
1d7dd0b357 Merge branch 'master' of https://github.com/Ralim/ts100 2019-01-26 21:05:28 +11:00
Ben V. Brown
36ea75a6df Fix rotation for TS80 2019-01-26 21:05:18 +11:00
Ben V. Brown
59b57ad80b Merge pull request #426 from federck/patch-19
Minor changes _IT
2019-01-26 19:56:33 +10:00
Ben V. Brown
cfcb8a27e6 Merge pull request #430 from speleos/patch-1
Updated portuguese translation. All fields are now translated.
2019-01-26 19:55:49 +10:00
Ben V. Brown
fa43aebec2 Rotation fix (#432) 2019-01-26 19:42:33 +10:00
Ben V. Brown
3182440854 Fix reading of handle compensation to fix offset tip temperatures 2019-01-26 20:35:39 +11:00
firebie
78e1a1b628 Rotation fix 2019-01-16 16:07:26 +02:00
speleos
eb39bf8666 Update translation_pt.json 2019-01-07 14:59:25 +00:00
federck
44f4c12eed Update Translation.cpp 2019-01-02 15:54:37 +01:00
federck
a33b05eb7c Minor changes _IT 2019-01-02 15:33:43 +01:00
Ben V. Brown
9514d3a1db RC2 build
Hopefully helps with #422
Wraps up this round of work  *i hope*
2019-01-01 18:01:55 +11:00
Ben V. Brown
f01ee786ab Less touchy bad tip detection, move tip model text over, at local debug options for atollic 2019-01-01 17:56:54 +11:00
Ben V. Brown
6389c00e1d Fix simple mode crash / lockup from buffer overflow 2019-01-01 17:49:11 +11:00
Ben V. Brown
f023761545 Rebalance ram 2019-01-01 15:15:52 +11:00
25 changed files with 638 additions and 306 deletions

View File

@@ -3,9 +3,9 @@
"languageLocalName": "Português",
"cyrillicGlyphs": false,
"messages": {
"SettingsCalibrationDone": "Calibration done!",
"SettingsCalibrationWarning": "A ponta deve estar em temperatura ambiente antes de continuar!",
"SettingsResetWarning": "Resetar para ajustes de fábrica?",
"SettingsCalibrationDone": "Calibração terminada!",
"SettingsCalibrationWarning": "A ponta deve estar à temperatura ambiente antes de continuar!",
"SettingsResetWarning": "Definições de fábrica?",
"UVLOWarningString": "DC BAIXO",
"UndervoltageString": "Subtensão",
"InputVoltageString": "Tensão ",
@@ -48,9 +48,9 @@
"UIMenu": {
"text2": [
"Interface",
"Usuário"
"Utilizador"
],
"desc": "Configurações da interface do usuário"
"desc": "Configurações do interface do utilizador"
},
"AdvancedMenu": {
"text2": [
@@ -67,7 +67,7 @@
"Fonte",
"alimentação"
],
"desc": "nte de alimentação. Define a tensão de corte. <DC=10V> <S=3.3V/célula>"
"desc": "Fonte de alimentação. Define a tensão de corte. <DC=10V> <S=3.3V/célula>"
},
"SleepTemperature": {
"text": "TMPE",
@@ -110,12 +110,12 @@
"desc": "Unidade de temperatura <C=Celsius F=Fahrenheit>"
},
"AdvancedIdle": {
"text": "OCIOSO",
"text": "EM ESPERA",
"text2": [
"Tela repouso",
"avançada"
],
"desc": "Exibe informações avançadas quando ocioso"
"desc": "Exibe informações avançadas quando em espera"
},
"DisplayRotation": {
"text": "ORIENT",
@@ -129,9 +129,9 @@
"text": "TURBO",
"text2": [
"Modo turbo",
"ativado"
"activado"
],
"desc": "Tecla frontal ativa modo \"turbo\""
"desc": "Tecla frontal activa modo \"turbo\""
},
"BoostTemperature": {
"text": "TTMP",
@@ -153,9 +153,9 @@
"text": "RESFRI",
"text2": [
"Piscar ao",
"resfriar"
"arrefecer"
],
"desc": "Faz o valor da temperatura piscar durante o resfriamento"
"desc": "Faz o valor da temperatura piscar durante o arrefecimento"
},
"TemperatureCalibration": {
"text": "CAL.TEMP",
@@ -166,7 +166,7 @@
"desc": "Calibra a temperatura"
},
"SettingsReset": {
"text": "RESETAR",
"text": "RESET",
"text2": [
"Reset de",
"fábrica?"
@@ -179,7 +179,7 @@
"Calibrar",
"tensão"
],
"desc": "Calibra a tensão de alimentação. Use os botões para ajustar o valor. Mantenha presionado para sair"
"desc": "Calibra a tensão de alimentação. Use os botões para ajustar o valor. Mantenha pressionado para sair"
},
"AdvancedSoldering": {
"text": "AVNCAD",
@@ -195,39 +195,39 @@
"Velocidade",
"texto ajuda"
],
"desc": "Velocidade que esse texto é exibido"
"desc": "Velocidade a que o texto é exibido"
},
"TipModel": {
"text": "TIPMO",
"text": "MODPNT",
"text2": [
"Tip",
"Model"
"Ponta",
"Modelo"
],
"desc": "Tip Model selection"
"desc": "Selecção de modelo de ponta"
},
"SimpleCalibrationMode": {
"text": "SMPCAL",
"text2": [
"Simple",
"Calibration"
"Calibração",
"Simples"
],
"desc": "Simple Calibration using Hot water"
"desc": "Calibração simples com água quente"
},
"AdvancedCalibrationMode": {
"text": "ADVCAL",
"text2": [
"Advanced",
"Calibration"
"Calibração",
"Avançada"
],
"desc": "Advanced calibration using thermocouple on the tip"
"desc": "Calibração avançada com um termopar na ponta"
},
"PowerInput": {
"text": "PWRW",
"text2": [
"Power",
"Wattage"
"Potência",
"Fonte"
],
"desc": "Power Wattage of the power adapter used"
"desc": "Potência da fonte usada (Watt)"
}
}
}

View File

@@ -3478,48 +3478,7 @@ void HAL_I2C_EV_IRQHandler(I2C_HandleTypeDef *hi2c)
}
}
}
/* Slave mode selected */
else
{
/* ADDR set --------------------------------------------------------------*/
if(((sr1itflags & I2C_FLAG_ADDR) != RESET) && ((itsources & I2C_IT_EVT) != RESET))
{
I2C_Slave_ADDR(hi2c);
}
/* STOPF set --------------------------------------------------------------*/
else if(((sr1itflags & I2C_FLAG_STOPF) != RESET) && ((itsources & I2C_IT_EVT) != RESET))
{
I2C_Slave_STOPF(hi2c);
}
/* I2C in mode Transmitter -----------------------------------------------*/
else if((sr2itflags & I2C_FLAG_TRA) != RESET)
{
/* TXE set and BTF reset -----------------------------------------------*/
if(((sr1itflags & I2C_FLAG_TXE) != RESET) && ((itsources & I2C_IT_BUF) != RESET) && ((sr1itflags & I2C_FLAG_BTF) == RESET))
{
I2C_SlaveTransmit_TXE(hi2c);
}
/* BTF set -------------------------------------------------------------*/
else if(((sr1itflags & I2C_FLAG_BTF) != RESET) && ((itsources & I2C_IT_EVT) != RESET))
{
I2C_SlaveTransmit_BTF(hi2c);
}
}
/* I2C in mode Receiver --------------------------------------------------*/
else
{
/* RXNE set and BTF reset ----------------------------------------------*/
if(((sr1itflags & I2C_FLAG_RXNE) != RESET) && ((itsources & I2C_IT_BUF) != RESET) && ((sr1itflags & I2C_FLAG_BTF) == RESET))
{
I2C_SlaveReceive_RXNE(hi2c);
}
/* BTF set -------------------------------------------------------------*/
else if(((sr1itflags & I2C_FLAG_BTF) != RESET) && ((itsources & I2C_IT_EVT) != RESET))
{
I2C_SlaveReceive_BTF(hi2c);
}
}
}
}
/**

View File

@@ -6,14 +6,19 @@ ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
_estack = 0x20005000; /* end of RAM */
_Min_Heap_Size = 0x200; /* required amount of heap */
_Min_Stack_Size = 0x400; /* required amount of stack */
_Min_Heap_Size = 0x300; /* required amount of heap */
_Min_Stack_Size = 1024; /* required amount of stack */
/* Memories definition */
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K
ROM (rx) : ORIGIN = 0x08004000, LENGTH = 46K
/* LOCAL_BUILD*/
/*ROM (rx) : ORIGIN = 0x08000000, LENGTH = 46K*/
/* production*/
ROM (rx) : ORIGIN = 0x08004000, LENGTH = 46K
}
/* ROM is normally 48K after the bootloader, however we allocate the last page for settings, and the second last one for display boot logo*/

View File

@@ -34,6 +34,7 @@ public:
private:
static I2C_HandleTypeDef *i2c;
static void I2C1_ClearBusyFlagErratum();
static SemaphoreHandle_t I2CSemaphore;
};

View File

@@ -10,7 +10,11 @@
#ifndef FONT_H_
#define FONT_H_
#include "Translation.h"
#ifdef LANG_RU
#ifndef CYRILLIC_GLYPHS
#define CYRILLIC_GLYPHS
#endif
#endif
#define FONT_12_WIDTH 12
/*

View File

@@ -101,13 +101,13 @@
#define configTICK_RATE_HZ ((TickType_t)100)
#define configMAX_PRIORITIES ( 4 )
#define configMINIMAL_STACK_SIZE ((uint16_t)256)
#define configTOTAL_HEAP_SIZE ((size_t)10240+2048) /*Currently use about 9000*/
#define configTOTAL_HEAP_SIZE ((size_t)1024*14) /*Currently use about 9000*/
#define configMAX_TASK_NAME_LEN ( 24 )
#define configUSE_16_BIT_TICKS 0
#define configUSE_MUTEXES 1
#define configQUEUE_REGISTRY_SIZE 8
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
#define configCHECK_FOR_STACK_OVERFLOW 0 /*Bump this to 2 during development and bug hunting*/
#define configCHECK_FOR_STACK_OVERFLOW 2 /*Bump this to 2 during development and bug hunting*/
/* Co-routine definitions. */

View File

@@ -19,15 +19,15 @@ public:
static Orientation getOrientation() {
#ifdef MODEL_TS80
uint8_t val = (FRToSI2C::I2C_RegisterRead(LIS2DH_I2C_ADDRESS,
LIS_INT2_SRC) >> 2);
LIS_INT2_SRC) >> 2);
if (val == 8)
val = 3;
else if (val==1)
val=0;
else if(val==2)
val=1;
else if (val == 1)
val = 1;
else if (val == 2)
val = 0;
else
val=3;
val = 3;
return static_cast<Orientation>(val);
#endif
#ifdef MODEL_TS100

View File

@@ -11,8 +11,8 @@
#define SETTINGS_H_
#include <stdint.h>
#include "stm32f1xx_hal.h"
#define SETTINGSVERSION \
0x16 /*Change this if you change the struct below to prevent people getting \
#define SETTINGSVERSION ( 0x19 )
/*Change this if you change the struct below to prevent people getting \
out of sync*/
/*
@@ -23,7 +23,7 @@ typedef struct {
uint16_t SolderingTemp; // current set point for the iron
uint16_t SleepTemp; // temp to drop to in sleep
uint8_t SleepTime; // minutes timeout to sleep
uint8_t cutoutSetting; // The voltage we cut out at for under voltage OR Power level for TS80
uint8_t cutoutSetting; // The voltage we cut out at for under voltage OR Power level for TS80
uint8_t OrientationMode :2; // If true we want to invert the display for lefties
uint8_t sensitivity :4; // Sensitivity of accelerometer (5 bits)
uint8_t autoStartMode :2; // Should the unit automatically jump straight

View File

@@ -18,7 +18,7 @@ void setupPower(uint8_t resistance);
int32_t tempToMilliWatts(int32_t rawTemp, uint16_t mass, uint8_t rawC);
void setTipMilliWatts(int32_t mw);
uint8_t milliWattsToPWM(int32_t milliWatts, uint8_t divisor);
uint8_t milliWattsToPWM(int32_t milliWatts, uint8_t divisor,uint8_t sample=0);
int32_t PWMToMilliWatts(uint8_t pwm, uint8_t divisor);
#endif /* POWER_HPP_ */

View File

@@ -4,95 +4,184 @@
* Created on: 14Apr.,2018
* Author: Ralim
*/
#include "hardware.h"
#include "FRToSI2C.hpp"
#define I2CUSESDMA
I2C_HandleTypeDef* FRToSI2C::i2c;
SemaphoreHandle_t FRToSI2C::I2CSemaphore;
void FRToSI2C::CpltCallback() {
i2c->State = HAL_I2C_STATE_READY; // Force state reset (even if tx error)
if (I2CSemaphore) {
xSemaphoreGiveFromISR(I2CSemaphore, NULL);
}
i2c->State = HAL_I2C_STATE_READY; // Force state reset (even if tx error)
if (I2CSemaphore) {
xSemaphoreGiveFromISR(I2CSemaphore, NULL);
}
}
void FRToSI2C::Mem_Read(uint16_t DevAddress, uint16_t MemAddress,
uint16_t MemAddSize, uint8_t* pData, uint16_t Size) {
uint16_t MemAddSize, uint8_t* pData, uint16_t Size) {
if (I2CSemaphore == NULL) {
// no RToS, run blocking code
HAL_I2C_Mem_Read(i2c, DevAddress, MemAddress, MemAddSize, pData, Size,
5000);
} else {
// RToS is active, run threading
// Get the mutex so we can use the I2C port
// Wait up to 1 second for the mutex
if (xSemaphoreTake(I2CSemaphore, (TickType_t)50) == pdTRUE) {
#ifdef I2CUSESDMA
if (I2CSemaphore == NULL) {
// no RToS, run blocking code
HAL_I2C_Mem_Read(i2c, DevAddress, MemAddress, MemAddSize, pData, Size,
5000);
} else {
// RToS is active, run threading
// Get the mutex so we can use the I2C port
// Wait up to 1 second for the mutex
if (xSemaphoreTake(I2CSemaphore, (TickType_t)50) == pdTRUE) {
if (HAL_I2C_Mem_Read(i2c, DevAddress, MemAddress, MemAddSize, pData, Size,
5000) != HAL_OK) {
}
xSemaphoreGive(I2CSemaphore);
} else {
}
}
if (HAL_I2C_Mem_Read(i2c, DevAddress, MemAddress, MemAddSize,
pData, Size,500) != HAL_OK) {
I2C1_ClearBusyFlagErratum();
xSemaphoreGive(I2CSemaphore);
}
xSemaphoreGive(I2CSemaphore);
#else
HAL_I2C_Mem_Read(i2c, DevAddress, MemAddress, MemAddSize, pData, Size,
5000);
HAL_I2C_Mem_Read(i2c, DevAddress, MemAddress, MemAddSize, pData, Size,
5000);
xSemaphoreGive(I2CSemaphore);
#endif
} else {
}
}
}
void FRToSI2C::I2C_RegisterWrite(uint8_t address, uint8_t reg, uint8_t data) {
Mem_Write(address, reg, I2C_MEMADD_SIZE_8BIT, &data, 1);
Mem_Write(address, reg, I2C_MEMADD_SIZE_8BIT, &data, 1);
}
uint8_t FRToSI2C::I2C_RegisterRead(uint8_t add, uint8_t reg) {
uint8_t tx_data[1];
Mem_Read(add, reg, I2C_MEMADD_SIZE_8BIT, tx_data, 1);
return tx_data[0];
uint8_t tx_data[1];
Mem_Read(add, reg, I2C_MEMADD_SIZE_8BIT, tx_data, 1);
return tx_data[0];
}
void FRToSI2C::Mem_Write(uint16_t DevAddress, uint16_t MemAddress,
uint16_t MemAddSize, uint8_t* pData, uint16_t Size) {
#ifdef I2CUSESDMA
if (I2CSemaphore == NULL) {
// no RToS, run blocking code
HAL_I2C_Mem_Write(i2c, DevAddress, MemAddress, MemAddSize, pData, Size,
5000);
} else {
// RToS is active, run threading
// Get the mutex so we can use the I2C port
// Wait up to 1 second for the mutex
if (xSemaphoreTake(I2CSemaphore, (TickType_t)50) == pdTRUE) {
if (HAL_I2C_Mem_Write(i2c, DevAddress, MemAddress, MemAddSize, pData,
Size, 5000) != HAL_OK) {
}
xSemaphoreGive(I2CSemaphore);
uint16_t MemAddSize, uint8_t* pData, uint16_t Size) {
} else {
}
}
if (I2CSemaphore == NULL) {
// no RToS, run blocking code
HAL_I2C_Mem_Write(i2c, DevAddress, MemAddress, MemAddSize, pData, Size,
5000);
} else {
// RToS is active, run threading
// Get the mutex so we can use the I2C port
// Wait up to 1 second for the mutex
if (xSemaphoreTake(I2CSemaphore, (TickType_t)50) == pdTRUE) {
#ifdef I2CUSESDMA
if (HAL_I2C_Mem_Write(i2c, DevAddress, MemAddress, MemAddSize,
pData, Size,500) != HAL_OK) {
I2C1_ClearBusyFlagErratum();
xSemaphoreGive(I2CSemaphore);
}
xSemaphoreGive(I2CSemaphore);
#else
HAL_I2C_Mem_Write(i2c, DevAddress, MemAddress, MemAddSize, pData, Size,
5000);
if (HAL_I2C_Mem_Write(i2c, DevAddress, MemAddress, MemAddSize, pData,
Size, 5000) != HAL_OK) {
}
xSemaphoreGive(I2CSemaphore);
#endif
} else {
}
}
}
void FRToSI2C::Transmit(uint16_t DevAddress, uint8_t* pData, uint16_t Size) {
if (I2CSemaphore == NULL) {
// no RToS, run blocking code
HAL_I2C_Master_Transmit(i2c, DevAddress, pData, Size, 5000);
} else {
// RToS is active, run threading
// Get the mutex so we can use the I2C port
// Wait up to 1 second for the mutex
if (xSemaphoreTake(I2CSemaphore, (TickType_t)50) == pdTRUE) {
#ifdef I2CUSESDMA
if (I2CSemaphore == NULL) {
// no RToS, run blocking code
HAL_I2C_Master_Transmit(i2c, DevAddress, pData, Size, 5000);
} else {
// RToS is active, run threading
// Get the mutex so we can use the I2C port
// Wait up to 1 second for the mutex
if (xSemaphoreTake(I2CSemaphore, (TickType_t)50) == pdTRUE) {
if (HAL_I2C_Master_Transmit_DMA(i2c, DevAddress, pData, Size) != HAL_OK) {
}
// xSemaphoreGive(I2CSemaphore);
} else {
}
}
if (HAL_I2C_Master_Transmit_DMA(i2c, DevAddress, pData, Size)
!= HAL_OK) {
I2C1_ClearBusyFlagErratum();
xSemaphoreGive(I2CSemaphore);
}
#else
HAL_I2C_Master_Transmit(i2c, DevAddress, pData, Size, 5000);
HAL_I2C_Master_Transmit(i2c, DevAddress, pData, Size, 5000);
xSemaphoreGive(I2CSemaphore);
#endif
} else {
}
}
}
void FRToSI2C::I2C1_ClearBusyFlagErratum() {
GPIO_InitTypeDef GPIO_InitStruct;
int timeout = 100;
int timeout_cnt = 0;
// 1. Clear PE bit.
i2c->Instance->CR1 &= ~(0x0001);
/**I2C1 GPIO Configuration
PB6 ------> I2C1_SCL
PB7 ------> I2C1_SDA
*/
// 2. Configure the SCL and SDA I/Os as General Purpose Output Open-Drain, High level (Write 1 to GPIOx_ODR).
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD;
GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Pin = SCL_Pin;
HAL_GPIO_Init(SCL_GPIO_Port, &GPIO_InitStruct);
HAL_GPIO_WritePin(SCL_GPIO_Port, SCL_Pin, GPIO_PIN_SET);
GPIO_InitStruct.Pin = SDA_Pin;
HAL_GPIO_Init(SDA_GPIO_Port, &GPIO_InitStruct);
HAL_GPIO_WritePin(SDA_GPIO_Port, SDA_Pin, GPIO_PIN_SET);
while (GPIO_PIN_SET != HAL_GPIO_ReadPin(SDA_GPIO_Port, SDA_Pin)) {
//Move clock to release I2C
HAL_GPIO_WritePin(SCL_GPIO_Port, SCL_Pin, GPIO_PIN_RESET);
asm("nop");
asm("nop");
asm("nop");
asm("nop");
HAL_GPIO_WritePin(SCL_GPIO_Port, SCL_Pin, GPIO_PIN_SET);
timeout_cnt++;
if (timeout_cnt > timeout)
return;
}
// 12. Configure the SCL and SDA I/Os as Alternate function Open-Drain.
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Pin = SCL_Pin;
HAL_GPIO_Init(SCL_GPIO_Port, &GPIO_InitStruct);
GPIO_InitStruct.Pin = SDA_Pin;
HAL_GPIO_Init(SDA_GPIO_Port, &GPIO_InitStruct);
HAL_GPIO_WritePin(SCL_GPIO_Port, SCL_Pin, GPIO_PIN_SET);
HAL_GPIO_WritePin(SDA_GPIO_Port, SDA_Pin, GPIO_PIN_SET);
// 13. Set SWRST bit in I2Cx_CR1 register.
i2c->Instance->CR1 |= 0x8000;
asm("nop");
// 14. Clear SWRST bit in I2Cx_CR1 register.
i2c->Instance->CR1 &= ~0x8000;
asm("nop");
// 15. Enable the I2C peripheral by setting the PE bit in I2Cx_CR1 register
i2c->Instance->CR1 |= 0x0001;
// Call initialization function.
HAL_I2C_Init(i2c);
}

View File

@@ -144,6 +144,9 @@ void OLED::drawChar(char c, char PrecursorCommand) {
}
void OLED::setRotation(bool leftHanded) {
#ifdef MODEL_TS80
leftHanded=!leftHanded;
#endif
if (inLeftHandedMode == leftHanded) {
return;
}
@@ -356,7 +359,7 @@ void OLED::drawHeatSymbol(uint8_t state) {
// Draw symbol 14
// Then draw over it, the bottom 5 pixels always stay. 8 pixels above that are
// the levels masks the symbol nicely
state /= 12; // 0-> 8 range
state /= 31; // 0-> 8 range
// Then we want to draw down (16-(5+state)
uint8_t cursor_x_temp = cursor_x;
drawSymbol(14);

View File

@@ -32,8 +32,13 @@ static void MX_ADC2_Init(void);
void Setup_HAL() {
SystemClock_Config();
__HAL_AFIO_REMAP_SWJ_DISABLE()
;
#ifndef LOCAL_BUILD
__HAL_AFIO_REMAP_SWJ_DISABLE();
#else
__HAL_AFIO_REMAP_SWJ_NOJTAG();
#endif
MX_GPIO_Init();
MX_DMA_Init();
MX_I2C1_Init();
@@ -226,7 +231,7 @@ static void MX_ADC2_Init(void) {
/* I2C1 init function */
static void MX_I2C1_Init(void) {
hi2c1.Instance = I2C1;
hi2c1.Init.ClockSpeed = 50000;
hi2c1.Init.ClockSpeed = 75000;
// OLED doesnt handle >100k when its asleep (off).
hi2c1.Init.DutyCycle = I2C_DUTYCYCLE_2;
hi2c1.Init.OwnAddress1 = 0;
@@ -243,7 +248,9 @@ static void MX_IWDG_Init(void) {
hiwdg.Instance = IWDG;
hiwdg.Init.Prescaler = IWDG_PRESCALER_256;
hiwdg.Init.Reload = 100;
#ifndef LOCAL_BUILD
HAL_IWDG_Init(&hiwdg);
#endif
}
/* TIM3 init function */
@@ -253,11 +260,11 @@ static void MX_TIM3_Init(void) {
TIM_OC_InitTypeDef sConfigOC;
htim3.Instance = TIM3;
htim3.Init.Prescaler = 4;
htim3.Init.Prescaler = 8;
htim3.Init.CounterMode = TIM_COUNTERMODE_UP;
htim3.Init.Period = 100; // 10 Khz PWM freq
htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV4; // 4mhz before div
htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE;
HAL_TIM_Base_Init(&htim3);
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
@@ -314,7 +321,7 @@ static void MX_TIM2_Init(void) {
htim2.Init.CounterMode = TIM_COUNTERMODE_UP;
htim2.Init.Period = 255 + 60;
htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV4; // 4mhz before divide
htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE;
HAL_TIM_Base_Init(&htim2);
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
@@ -361,13 +368,13 @@ static void MX_DMA_Init(void) {
/* DMA interrupt init */
/* DMA1_Channel1_IRQn interrupt configuration */
HAL_NVIC_SetPriority(DMA1_Channel1_IRQn, 15, 0);
HAL_NVIC_SetPriority(DMA1_Channel1_IRQn, 5, 0);
HAL_NVIC_EnableIRQ(DMA1_Channel1_IRQn);
/* DMA1_Channel6_IRQn interrupt configuration */
HAL_NVIC_SetPriority(DMA1_Channel6_IRQn, 15, 0);
HAL_NVIC_SetPriority(DMA1_Channel6_IRQn, 5, 0);
HAL_NVIC_EnableIRQ(DMA1_Channel6_IRQn);
/* DMA1_Channel7_IRQn interrupt configuration */
HAL_NVIC_SetPriority(DMA1_Channel7_IRQn, 15, 0);
HAL_NVIC_SetPriority(DMA1_Channel7_IRQn, 5, 0);
HAL_NVIC_EnableIRQ(DMA1_Channel7_IRQn);
}

View File

@@ -947,9 +947,9 @@ const char* SettingsDescriptions[] = {
/* ShutdownTimeout */ "Imposta il timer per lo spegnimento <minuti>",
/* MotionSensitivity */ "Imposta la sensibilità al movimento per uscire dalla modalità Standby <0: nessuna; 1: minima; 9: massima>",
/* TemperatureUnit */ "Scegli l'unità di misura per la temperatura <C: grado Celsius; F: grado Farenheit>",
/* AdvancedIdle */ "Mostra informazioni dettagliate con un carattere più piccolo all'interno della schermata principale",
/* AdvancedIdle */ "Mostra informazioni dettagliate all'interno della schermata principale",
/* DisplayRotation */ "Imposta l'orientamento del display <A: automatico; S: mano sinistra; D: mano destra>",
/* BoostEnabled */ "Il tasto superiore attiva la funzione «Turbo» durante la modalità Saldatura",
/* BoostEnabled */ "Attiva la funzione «Turbo», durante la modalità Saldatura, tenendo premuto il tasto superiore",
/* BoostTemperature */ "Imposta la temperatura della funzione «Turbo»",
/* AutoStart */ "Attiva automaticamente il saldatore quando viene alimentato <A: saldatura; S: standby; D: disattiva>",
/* CooldownBlink */ "Mostra, lampeggiante, la temperatura durante il raffreddamento se la punta è ancora calda",
@@ -961,7 +961,7 @@ const char* SettingsDescriptions[] = {
/* TipModel */ "Seleziona il modello della punta in uso",
/* SimpleCalibrationMode */ "Calibra le rilevazioni di temperatura tramite l'utilizzo di acqua calda",
/* AdvancedCalibrationMode */ "Calibra le rilevazioni di temperatura attraverso la termocoppia presente nella punta",
/* PowerInput */ "Imposta la potenza dell'alimentatore in uso",
/* PowerInput */ "Imposta la potenza massima erogabile dall'alimentatore in uso",
};
const char* SettingsCalibrationDone = "Calibrazione effettuata";
@@ -977,10 +977,10 @@ const char* SleepingAdvancedString = "Standby";
const char* WarningSimpleString = "HOT!";
const char* WarningAdvancedString = "PUNTA CALDA!";
const char* SleepingTipAdvancedString = "Punta:";
const char* IdleTipString = "Punta:";
const char* IdleTipString = "T punta:";
const char* IdleSetString = "/";
const char* TipDisconnectedString = "PUNTA ASSENTE";
const char* SolderingAdvancedPowerPrompt = "Potenza:";
const char* SolderingAdvancedPowerPrompt = "Potenz:";
const char* OffString = "OFF";
const char SettingRightChar = 'D';
@@ -997,7 +997,7 @@ const char* SettingsShortNames[][2] = {
/* ShutdownTimeout */ { "Timer", "spegnimento" },
/* MotionSensitivity */ { "Sensibilità", "al movimento" },
/* TemperatureUnit */ { "Unità di", "temperatura" },
/* AdvancedIdle */ { "Mostra", "dettagli" },
/* AdvancedIdle */ { "Interfaccia", "testuale" },
/* DisplayRotation */ { "Orientamento", "display" },
/* BoostEnabled */ { "Funzione", "«Turbo»" },
/* BoostTemperature */ { "Temp", "«Turbo»" },
@@ -1008,7 +1008,7 @@ const char* SettingsShortNames[][2] = {
/* VoltageCalibration */ { "Calibrazione", "tensione" },
/* AdvancedSoldering */ { "Dettagli", "saldatura" },
/* ScrollingSpeed */ { "Velocità", "testo" },
/* TipModel */ { "Modello", "della punta" },
/* TipModel */ { "Modello", "punta" },
/* SimpleCalibrationMode */ { "Calibrazione", "semplice" },
/* AdvancedCalibrationMode */ { "Calibrazione", "avanzata" },
/* PowerInput */ { "Potenza", "alimentaz" },

View File

@@ -472,10 +472,10 @@ static void settings_setDisplayRotation(void) {
systemSettings.OrientationMode = systemSettings.OrientationMode % 3;
switch (systemSettings.OrientationMode) {
case 0:
OLED::setRotation(true);
OLED::setRotation(false);
break;
case 1:
OLED::setRotation(false);
OLED::setRotation(true);
break;
case 2:
// do nothing on auto
@@ -580,7 +580,7 @@ static void settings_displayTipModel(void) {
OLED::setFont(1);
// set the cursor
// Print the mfg
OLED::setCursor(40, 0);
OLED::setCursor(55, 0);
if (systemSettings.tipType < Tip_MiniWare) {
#ifdef MODEL_TS100
OLED::print("TS100");
@@ -596,7 +596,7 @@ static void settings_displayTipModel(void) {
else if (systemSettings.tipType == Tip_Custom) {
OLED::print("User");
}
OLED::setCursor(40, 8);
OLED::setCursor(55, 8);
#ifdef MODEL_TS100
switch ((enum TipType)systemSettings.tipType) {
case TS_B2:
@@ -652,22 +652,28 @@ static void setTipOffset() {
uint32_t offset = 0;
for (uint8_t i = 0; i < 15; i++) {
offset += getTipRawTemp(1);
offset += getTipRawTemp(0);
// cycle through the filter a fair bit to ensure we're stable.
OLED::clearScreen();
OLED::setCursor(0, 0);
OLED::print(".");
for (uint8_t x = 0; x < i / 4; x++)
OLED::print(".");
OLED::refresh();
osDelay(333);
osDelay(100);
}
systemSettings.CalibrationOffset = offset / 15;
// Need to remove from this the ambient temperature offset
uint32_t ambientoffset = getHandleTemperature(); // Handle temp in C
ambientoffset *=1000;
uint32_t ambientoffset = getHandleTemperature(); // Handle temp in C x10
ambientoffset *= 100;
ambientoffset /= tipGainCalValue;
systemSettings.CalibrationOffset -= ambientoffset;
setCalibrationOffset(systemSettings.CalibrationOffset); // store the error
osDelay(100);
OLED::clearScreen();
OLED::setCursor(0, 0);
OLED::print("OK");
OLED::refresh();
osDelay(1000);
}
static void calibration_enterSimpleCal(void) {
// User has entered into the simple cal routine
@@ -816,10 +822,10 @@ static void settings_setCalibrateVIN(void) {
for (;;) {
OLED::setCursor(0, 0);
OLED::printNumber(getInputVoltageX10(systemSettings.voltageDiv,0) / 10,
OLED::printNumber(getInputVoltageX10(systemSettings.voltageDiv, 0) / 10,
2);
OLED::print(".");
OLED::printNumber(getInputVoltageX10(systemSettings.voltageDiv,0) % 10,
OLED::printNumber(getInputVoltageX10(systemSettings.voltageDiv, 0) % 10,
1);
OLED::print("V");

View File

@@ -34,7 +34,7 @@ uint16_t getHandleTemperature() {
result -= 4965; // remove 0.5V offset
// 10mV per C
// 99.29 counts per Deg C above 0C
result *= 10;
result *= 100;
result /= 993;
return result;
}
@@ -420,10 +420,10 @@ int16_t calculateMaxVoltage(uint8_t useHP) {
}
#endif
volatile uint32_t pendingPWM = 0;
volatile uint8_t pendingPWM = 0;
void setTipPWM(uint8_t pulse) {
PWMSafetyTimer = 50; // This is decremented in the handler for PWM so that the tip pwm is
PWMSafetyTimer = 10; // This is decremented in the handler for PWM so that the tip pwm is
// disabled if the PID task is not scheduled often enough.
pendingPWM = pulse;

View File

@@ -69,16 +69,21 @@ int main(void) {
/* Create the thread(s) */
/* definition and creation of GUITask */
osThreadDef(GUITask, startGUITask, osPriorityBelowNormal, 0, 4 * 1024 / 4);
osThreadDef(GUITask, startGUITask, osPriorityBelowNormal, 0, 5 * 1024 / 4);
GUITaskHandle = osThreadCreate(osThread(GUITask), NULL);
/* definition and creation of PIDTask */
osThreadDef(PIDTask, startPIDTask, osPriorityRealtime, 0, 2 * 1024 / 4);
osThreadDef(PIDTask, startPIDTask, osPriorityRealtime, 0, 3 * 1024 / 4);
PIDTaskHandle = osThreadCreate(osThread(PIDTask), NULL);
if (PCBVersion < 3) {
/* definition and creation of MOVTask */
osThreadDef(MOVTask, startMOVTask, osPriorityNormal, 0, 2 * 1024 / 4);
osThreadDef(MOVTask, startMOVTask, osPriorityNormal, 0, 4 * 1024 / 4);
MOVTaskHandle = osThreadCreate(osThread(MOVTask), NULL);
#ifdef LOCAL_BUILD
//Test that there was enough ram in the FreeRToS pool to allocate all the tasks
if (MOVTaskHandle == 0)
asm("bkpt");
#endif
}
/* Start scheduler */
@@ -265,37 +270,37 @@ static void gui_drawBatteryIcon() {
// User is on a lithium battery
// we need to calculate which of the 10 levels they are on
uint8_t cellCount = systemSettings.cutoutSetting + 2;
uint16_t cellV = getInputVoltageX10(systemSettings.voltageDiv, 0)
/ cellCount;
uint32_t cellV = getInputVoltageX10(systemSettings.voltageDiv, 0)
/ cellCount;
// Should give us approx cell voltage X10
// Range is 42 -> 33 = 9 steps therefore we will use battery 1-10
if (cellV < 33)
cellV = 33;
cellV -= 33;// Should leave us a number of 0-9
cellV = 33;
cellV -= 33; // Should leave us a number of 0-9
if (cellV > 9)
cellV = 9;
cellV = 9;
OLED::drawBattery(cellV + 1);
} else
OLED::drawSymbol(15); // Draw the DC Logo
OLED::drawSymbol(15); // Draw the DC Logo
#else
// On TS80 we replace this symbol with the voltage we are operating on
// If <9V then show single digit, if not show duals
uint8_t V = getInputVoltageX10(systemSettings.voltageDiv, 0);
if (V % 10 >= 5)
V = V / 10 + 1; // round up
else
V = V / 10;
if (V >= 10) {
int16_t xPos = OLED::getCursorX();
OLED::setFont(1);
OLED::printNumber(1, 1);
OLED::setCursor(xPos, 8);
OLED::printNumber(V % 10, 1);
OLED::setFont(0);
OLED::setCursor(xPos + 12, 0); // need to reset this as if we drew a wide char
} else {
OLED::printNumber(V, 1);
}
// On TS80 we replace this symbol with the voltage we are operating on
// If <9V then show single digit, if not show duals
uint8_t V = getInputVoltageX10(systemSettings.voltageDiv, 0);
if (V % 10 >= 5)
V = V / 10 + 1;// round up
else
V = V / 10;
if (V >= 10) {
int16_t xPos = OLED::getCursorX();
OLED::setFont(1);
OLED::printNumber(1, 1);
OLED::setCursor(xPos, 8);
OLED::printNumber(V % 10, 1);
OLED::setFont(0);
OLED::setCursor(xPos + 12, 0); // need to reset this as if we drew a wide char
} else {
OLED::printNumber(V, 1);
}
#endif
}
static void gui_solderingTempAdjust() {
@@ -367,7 +372,7 @@ static void gui_solderingTempAdjust() {
#ifdef MODEL_TS80
if (!OLED::getRotation())
#else
if (OLED::getRotation())
if (OLED::getRotation())
#endif
OLED::drawChar('-');
else
@@ -383,7 +388,7 @@ static void gui_solderingTempAdjust() {
#ifdef MODEL_TS80
if (!OLED::getRotation())
#else
if (OLED::getRotation())
if (OLED::getRotation())
#endif
OLED::drawChar('+');
else
@@ -410,7 +415,7 @@ static int gui_SolderingSleepingMode() {
|| (xTaskGetTickCount() - lastButtonTime < 100))
return 0; // user moved or pressed a button, go back to soldering
#ifdef MODEL_TS100
if (checkVoltageForExit())
if (checkVoltageForExit())
return 1; // return non-zero on error
#endif
if (systemSettings.temperatureInF) {
@@ -501,6 +506,7 @@ static void gui_solderingMode(uint8_t jumpToSleep) {
* --> Double button to exit
*/
bool boostModeOn = false;
uint8_t badTipCounter = 0;
uint32_t sleepThres = 0;
if (systemSettings.SleepTime < 6)
sleepThres = systemSettings.SleepTime * 10 * 100;
@@ -549,71 +555,77 @@ static void gui_solderingMode(uint8_t jumpToSleep) {
OLED::clearScreen();
OLED::setFont(0);
uint16_t tipTemp = getTipRawTemp(0);
if (tipTemp > 32752) {
if (tipTemp > 32700) {
badTipCounter++;// Use a counter so that error has to persist for > 1 second continious so that peak errors dont trip it
} else {
badTipCounter = 0;
}
//Draw in the screen details
if (systemSettings.detailedSoldering) {
OLED::setFont(1);
OLED::print(SolderingAdvancedPowerPrompt); // Power:
OLED::printNumber(milliWattHistory[0] / 1000, 2);
OLED::drawChar('.');
OLED::printNumber(milliWattHistory[0] / 100 % 10, 1);
OLED::drawChar('W');
if (systemSettings.sensitivity && systemSettings.SleepTime) {
OLED::print(" ");
display_countdown(sleepThres);
}
OLED::setCursor(0, 8);
OLED::print(SleepingTipAdvancedString);
gui_drawTipTemp(true);
OLED::print(" ");
printVoltage();
OLED::drawChar('V');
} else {
// We switch the layout direction depending on the orientation of the
// OLED::
if (OLED::getRotation()) {
// battery
gui_drawBatteryIcon();
OLED::drawChar(' '); // Space out gap between battery <-> temp
gui_drawTipTemp(true); // Draw current tip temp
// We draw boost arrow if boosting, or else gap temp <-> heat
// indicator
if (boostModeOn)
OLED::drawSymbol(2);
else
OLED::drawChar(' ');
// Draw heating/cooling symbols
OLED::drawHeatSymbol(
milliWattsToPWM(milliWattHistory[0],
systemSettings.voltageDiv));
} else {
// Draw heating/cooling symbols
OLED::drawHeatSymbol(
milliWattsToPWM(milliWattHistory[0],
systemSettings.voltageDiv));
// We draw boost arrow if boosting, or else gap temp <-> heat
// indicator
if (boostModeOn)
OLED::drawSymbol(2);
else
OLED::drawChar(' ');
gui_drawTipTemp(true); // Draw current tip temp
OLED::drawChar(' '); // Space out gap between battery <-> temp
gui_drawBatteryIcon();
}
}
if (badTipCounter > 128) {
OLED::print(BadTipString);
OLED::refresh();
currentlyActiveTemperatureTarget = 0;
waitForButtonPress();
currentlyActiveTemperatureTarget = 0;
return;
} else {
if (systemSettings.detailedSoldering) {
OLED::setFont(1);
OLED::print(SolderingAdvancedPowerPrompt); // Power:
OLED::printNumber(milliWattHistory[0] / 1000, 2);
OLED::drawChar('.');
OLED::printNumber(milliWattHistory[0] / 100 % 10, 1);
OLED::drawChar('W');
if (systemSettings.sensitivity && systemSettings.SleepTime) {
OLED::print(" ");
display_countdown(sleepThres);
}
OLED::setCursor(0, 8);
OLED::print(SleepingTipAdvancedString);
gui_drawTipTemp(true);
OLED::print(" ");
printVoltage();
OLED::drawChar('V');
} else {
// We switch the layout direction depending on the orientation of the
// OLED::
if (OLED::getRotation()) {
// battery
gui_drawBatteryIcon();
OLED::drawChar(' '); // Space out gap between battery <-> temp
gui_drawTipTemp(true); // Draw current tip temp
// We draw boost arrow if boosting, or else gap temp <-> heat
// indicator
if (boostModeOn)
OLED::drawSymbol(2);
else
OLED::drawChar(' ');
// Draw heating/cooling symbols
OLED::drawHeatSymbol(
milliWattsToPWM(milliWattHistory[0],
systemSettings.voltageDiv));
} else {
// Draw heating/cooling symbols
OLED::drawHeatSymbol(
milliWattsToPWM(milliWattHistory[0],
systemSettings.voltageDiv));
// We draw boost arrow if boosting, or else gap temp <-> heat
// indicator
if (boostModeOn)
OLED::drawSymbol(2);
else
OLED::drawChar(' ');
gui_drawTipTemp(true); // Draw current tip temp
OLED::drawChar(' '); // Space out gap between battery <-> temp
gui_drawBatteryIcon();
}
}
}
OLED::refresh();
@@ -671,7 +683,7 @@ __DATE__, "Heap: ", "HWMG: ", "HWMP: ", "HWMM: ", "Time: ", "Move: ", "RTip: ",
"Tm ", "Ralim-",
#endif
};
};
void showVersion(void) {
uint8_t screen = 0;
@@ -681,9 +693,9 @@ void showVersion(void) {
OLED::setCursor(0, 0); // Position the cursor at the 0,0 (top left)
OLED::setFont(1); // small font
#ifdef MODEL_TS100
OLED::print((char *) "V2.06 TS100"); // Print version number
OLED::print((char *) "V2.06 TS100"); // Print version number
#else
OLED::print((char *) "V2.06 TS80"); // Print version number
OLED::print((char *) "V2.06 TS80"); // Print version number
#endif
OLED::setCursor(0, 8); // second line
OLED::print(HEADERS[screen]);
@@ -758,7 +770,7 @@ void startGUITask(void const *argument __unused) {
bool buttonLockout = false;
bool tempOnDisplay = false;
getTipRawTemp(1); // reset filter
OLED::setRotation(!(systemSettings.OrientationMode & 1));
OLED::setRotation(systemSettings.OrientationMode & 1);
uint32_t ticks = xTaskGetTickCount();
ticks += 400; // 4 seconds from now
while (xTaskGetTickCount() < ticks) {
@@ -870,7 +882,7 @@ void startGUITask(void const *argument __unused) {
#ifdef MODEL_TS80
if (!OLED::getRotation()) {
#else
if (OLED::getRotation()) {
if (OLED::getRotation()) {
#endif
OLED::drawArea(12, 0, 84, 16, idleScreenBG);
OLED::setCursor(0, 0);
@@ -891,7 +903,7 @@ void startGUITask(void const *argument __unused) {
#ifdef MODEL_TS80
if (!OLED::getRotation()) {
#else
if (OLED::getRotation()) {
if (OLED::getRotation()) {
#endif
// in right handed mode we want to draw over the first part
OLED::fillArea(55, 0, 41, 16, 0); // clear the area for the temp
@@ -920,14 +932,14 @@ void startPIDTask(void const *argument __unused) {
*/
setTipMilliWatts(0); // disable the output driver if the output is set to be off
#ifdef MODEL_TS80
idealQCVoltage = calculateMaxVoltage(systemSettings.cutoutSetting);
idealQCVoltage = calculateMaxVoltage(systemSettings.cutoutSetting);
#endif
uint8_t rawC = ctoTipMeasurement(101) - ctoTipMeasurement(100); // 1*C change in raw.
#ifdef MODEL_TS80
//Set power management code to the tip resistance in ohms * 10
setupPower(calculateTipR() / 100);
size_t lastPowerPulse = 0;
//Set power management code to the tip resistance in ohms * 10
setupPower(calculateTipR() / 100);
//size_t lastPowerPulse = 0;
#else
setupPower(85);
@@ -944,10 +956,11 @@ void startPIDTask(void const *argument __unused) {
if (currentlyActiveTemperatureTarget) {
// Cap the max set point to 450C
if (currentlyActiveTemperatureTarget > ctoTipMeasurement(450)) {
//Maximum allowed output
currentlyActiveTemperatureTarget = ctoTipMeasurement(450);
}
if (currentlyActiveTemperatureTarget > 32500) {
currentlyActiveTemperatureTarget = 32500;
} else if (currentlyActiveTemperatureTarget > 32400) {
//Cap to max adc reading
currentlyActiveTemperatureTarget = 32400;
}
// As we get close to our target, temp noise causes the system
@@ -1019,6 +1032,8 @@ void startPIDTask(void const *argument __unused) {
HAL_IWDG_Refresh(&hiwdg);
} else {
asm("bkpt");
//ADC interrupt timeout
setTipMilliWatts(0);
setTipPWM(0);
@@ -1033,15 +1048,15 @@ void startMOVTask(void const *argument __unused) {
#ifdef MODEL_TS80
startQC(systemSettings.voltageDiv);
while (pidTaskNotification == 0)
osDelay(20); // To ensure we return after idealQCVoltage/tip resistance
osDelay(20); // To ensure we return after idealQCVoltage/tip resistance
seekQC(idealQCVoltage, systemSettings.voltageDiv); // this will move the QC output to the preferred voltage to start with
seekQC(idealQCVoltage, systemSettings.voltageDiv);// this will move the QC output to the preferred voltage to start with
#else
osDelay(250); // wait for accelerometer to stabilize
#endif
OLED::setRotation(!(systemSettings.OrientationMode & 1));
OLED::setRotation(systemSettings.OrientationMode & 1);
lastMovementTime = 0;
int16_t datax[MOVFilter] = { 0 };
int16_t datay[MOVFilter] = { 0 };
@@ -1121,9 +1136,9 @@ void startMOVTask(void const *argument __unused) {
osDelay(100); // Slow down update rate
#ifdef MODEL_TS80
if (currentlyActiveTemperatureTarget) {
seekQC(idealQCVoltage, systemSettings.voltageDiv); // Run the QC seek again to try and compensate for cable V drop
}
if (currentlyActiveTemperatureTarget) {
seekQC(idealQCVoltage, systemSettings.voltageDiv); // Run the QC seek again to try and compensate for cable V drop
}
#endif
}
}
@@ -1185,9 +1200,13 @@ void HAL_I2C_MemTxCpltCallback(I2C_HandleTypeDef *hi2c __unused) {
FRToSI2C::CpltCallback();
}
void HAL_I2C_ErrorCallback(I2C_HandleTypeDef *hi2c __unused) {
asm("bkpt");
FRToSI2C::CpltCallback();
}
void HAL_I2C_AbortCpltCallback(I2C_HandleTypeDef *hi2c __unused) {
//asm("bkpt");
FRToSI2C::CpltCallback();
}
void HAL_I2C_MemRxCpltCallback(I2C_HandleTypeDef *hi2c __unused) {
@@ -1195,6 +1214,7 @@ void HAL_I2C_MemRxCpltCallback(I2C_HandleTypeDef *hi2c __unused) {
}
void vApplicationStackOverflowHook(xTaskHandle *pxTask __unused,
signed portCHAR *pcTaskName __unused) {
asm("bkpt");
// We dont have a good way to handle a stack overflow at this point in time
NVIC_SystemReset();
}

View File

@@ -28,7 +28,7 @@ int32_t tempToMilliWatts(int32_t rawTemp, uint16_t mass, uint8_t rawC) {
}
void setTipMilliWatts(int32_t mw) {
int32_t output = milliWattsToPWM(mw, systemSettings.voltageDiv / 10);
int32_t output = milliWattsToPWM(mw, systemSettings.voltageDiv / 10,1);
setTipPWM(output);
uint16_t actualMilliWatts = PWMToMilliWatts(output,
systemSettings.voltageDiv / 10);
@@ -36,12 +36,14 @@ void setTipMilliWatts(int32_t mw) {
milliWattHistory.update(actualMilliWatts);
}
uint8_t milliWattsToPWM(int32_t milliWatts, uint8_t divisor) {
uint8_t milliWattsToPWM(int32_t milliWatts, uint8_t divisor, uint8_t sample) {
//P = V^2 / R, v*v = v^2 * 100
// R = R*10
// P therefore is in V^2*10/R = W*10.
// Scale input milliWatts to the pwm rate
int32_t v = getInputVoltageX10(divisor, 1); // 100 = 10v
if (milliWatts == 0)
return 0;
int32_t v = getInputVoltageX10(divisor, sample); // 100 = 10v
int32_t availableMilliWatts = v * v / tipResistance;
//int32_t pwm = ((powerPWM * totalPWM / powerPWM) * milliWatts) / availableMilliWatts;
@@ -51,8 +53,8 @@ uint8_t milliWattsToPWM(int32_t milliWatts, uint8_t divisor) {
} else if (pwm < 0) {
pwm = 0;
}
if (milliWatts == 0)
pwm = 0;
return pwm;
}

View File

@@ -26,12 +26,6 @@ void HAL_MspInit(void) {
/* SysTick_IRQn interrupt configuration */
HAL_NVIC_SetPriority(SysTick_IRQn, 15, 0);
/**NOJTAG: JTAG-DP Disabled and SW-DP Enabled
*/
//__HAL_AFIO_REMAP_SWJ_NOJTAG()
//;
__HAL_AFIO_REMAP_SWJ_DISABLE()
; /*Disable swd for debug io use*/
}
@@ -88,7 +82,7 @@ void HAL_I2C_MspInit(I2C_HandleTypeDef* hi2c) {
GPIO_InitStruct.Pin = SCL_Pin | SDA_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_MEDIUM;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/* Peripheral clock enable */

View File

@@ -11,9 +11,14 @@
#if defined(STM32F100xE) || defined(STM32F101xE) || defined(STM32F101xG) || defined(STM32F103xE) || defined(STM32F103xG)
/* #define DATA_IN_ExtSRAM */
#endif /* STM32F100xE || STM32F101xE || STM32F101xG || STM32F103xE || STM32F103xG */
#ifndef LOCAL_BUILD
#define VECT_TAB_OFFSET 0x00004000U /*!< Vector Table base offset field.
This value must be a multiple of 0x200. */
#else
#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field.
This value must be a multiple of 0x200. */
#warning LOCAL_BUILD SETUP
#endif
//We offset this by 0x4000 to because of the bootloader
/*******************************************************************************
* Clock Definitions

View File

@@ -46,7 +46,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\CMSIS\device&quot;"/>
</option>
<option id="com.atollic.truestudio.common_options.target.interwork.1685024437" name="Mix ARM/Thumb" superClass="com.atollic.truestudio.common_options.target.interwork" useByScannerDiscovery="false"/>
<option id="com.atollic.truestudio.exe.release.toolchain.as.debug.flags.1010729648" superClass="com.atollic.truestudio.exe.release.toolchain.as.debug.flags" useByScannerDiscovery="false" value="com.atollic.truestudio.as.debug.flags.3" valueType="enumerated"/>
<option id="com.atollic.truestudio.exe.release.toolchain.as.debug.flags.1010729648" name="Debug Level" superClass="com.atollic.truestudio.exe.release.toolchain.as.debug.flags" useByScannerDiscovery="false" value="com.atollic.truestudio.as.debug.flags.3" valueType="enumerated"/>
<inputType id="com.atollic.truestudio.as.input.640267647" name="Input" superClass="com.atollic.truestudio.as.input"/>
</tool>
<tool id="com.atollic.truestudio.exe.release.toolchain.gcc.45651038" name="C Compiler" superClass="com.atollic.truestudio.exe.release.toolchain.gcc">
@@ -126,7 +126,7 @@
<option id="com.atollic.truestudio.gpp.warnings.extra.843614419" name="Enable extra warning flags" superClass="com.atollic.truestudio.gpp.warnings.extra" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.atollic.truestudio.gpp.cppstandard.1895895086" name="C++ standard" superClass="com.atollic.truestudio.gpp.cppstandard" useByScannerDiscovery="false" value="com.atollic.truestudio.gpp.cppstandard.gnupp14" valueType="enumerated"/>
<option id="com.atollic.truestudio.common_options.target.interwork.429864345" name="Mix ARM/Thumb" superClass="com.atollic.truestudio.common_options.target.interwork" useByScannerDiscovery="false"/>
<option id="com.atollic.truestudio.gpp.optimization.no_strict_aliasing.1375071191" superClass="com.atollic.truestudio.gpp.optimization.no_strict_aliasing" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<option id="com.atollic.truestudio.gpp.optimization.no_strict_aliasing.1375071191" name="No strict aliasing" superClass="com.atollic.truestudio.gpp.optimization.no_strict_aliasing" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<inputType id="com.atollic.truestudio.gpp.input.1156264590" superClass="com.atollic.truestudio.gpp.input"/>
</tool>
<tool id="com.atollic.truestudio.exe.release.toolchain.ldcc.407189665" name="C++ Linker" superClass="com.atollic.truestudio.exe.release.toolchain.ldcc">
@@ -315,6 +315,166 @@
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="com.atollic.truestudio.configuration.release.200032419.2005314669.1746279461">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.atollic.truestudio.configuration.release.200032419.2005314669.1746279461" moduleId="org.eclipse.cdt.core.settings" name="TS100_LOCAL">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GCCErrorParser" id="com.atollic.truestudio.configuration.release.200032419.2005314669.1746279461" name="TS100_LOCAL" parent="com.atollic.truestudio.configuration.release" postannouncebuildStep="" postbuildStep="" preannouncebuildStep="" prebuildStep="">
<folderInfo id="com.atollic.truestudio.configuration.release.200032419.2005314669.1746279461." name="/" resourcePath="">
<toolChain errorParsers="" id="com.atollic.truestudio.exe.release.toolchain.743607422" name="Atollic ARM Tools" superClass="com.atollic.truestudio.exe.release.toolchain">
<option id="com.atollic.truestudio.general.runtimelib.649265794" name="Runtime Library" superClass="com.atollic.truestudio.general.runtimelib" useByScannerDiscovery="false" value="com.atollic.truestudio.ld.general.cclib.CCStandardCStandard" valueType="enumerated"/>
<option id="com.atollic.truestudio.toolchain_options.mcu.1178686191" name="Microcontroller" superClass="com.atollic.truestudio.toolchain_options.mcu" useByScannerDiscovery="false" value="STM32F103T8" valueType="string"/>
<option id="com.atollic.truestudio.toolchain_options.vendor.33572042" name="Vendor name" superClass="com.atollic.truestudio.toolchain_options.vendor" useByScannerDiscovery="false" value="STMicroelectronics" valueType="string"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.atollic.truestudio.exe.release.toolchain.platform.179000850" isAbstract="false" name="release platform" superClass="com.atollic.truestudio.exe.release.toolchain.platform"/>
<builder buildPath="${workspace_loc:/TS100A}/Release" customBuilderProperties="toolChainpathString=C:\\Program Files (x86)\\Atollic\\TrueSTUDIO for STM32 9.1.0\\ARMTools\\bin|toolChainpathType=1|com.atollic.truestudio.common_options.target.vendor=STMicroelectronics|com.atollic.truestudio.common_options.target.mcu=STM32F103T8|" errorParsers="" id="com.atollic.truestudio.mbs.builder1.1206056378" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="com.atollic.truestudio.mbs.builder1"/>
<tool command="arm-atollic-eabi-gcc -c" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GASErrorParser" id="com.atollic.truestudio.exe.release.toolchain.as.450255183" name="Assembler" superClass="com.atollic.truestudio.exe.release.toolchain.as">
<option id="com.atollic.truestudio.common_options.target.endianess.1980015520" name="Endianess" superClass="com.atollic.truestudio.common_options.target.endianess" useByScannerDiscovery="false"/>
<option id="com.atollic.truestudio.common_options.target.mcpu.1917513940" name="Microcontroller" superClass="com.atollic.truestudio.common_options.target.mcpu" useByScannerDiscovery="false" value="STM32F103T8" valueType="enumerated"/>
<option id="com.atollic.truestudio.common_options.target.instr_set.656507492" name="Instruction set" superClass="com.atollic.truestudio.common_options.target.instr_set" useByScannerDiscovery="false" value="com.atollic.truestudio.common_options.target.instr_set.thumb2" valueType="enumerated"/>
<option id="com.atollic.truestudio.common_options.target.fpucore.1067556557" name="FPU" superClass="com.atollic.truestudio.common_options.target.fpucore" useByScannerDiscovery="false" value="com.atollic.truestudio.common_options.target.fpucore.None" valueType="enumerated"/>
<option id="com.atollic.truestudio.common_options.target.fpu.909713753" name="Floating point" superClass="com.atollic.truestudio.common_options.target.fpu" useByScannerDiscovery="false"/>
<option id="com.atollic.truestudio.as.symbols.defined.1463342746" name="Defined symbols" superClass="com.atollic.truestudio.as.symbols.defined" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="STM32F103T8Ux"/>
<listOptionValue builtIn="false" value="LOCAL_BUILD"/>
<listOptionValue builtIn="false" value="STM32F1"/>
<listOptionValue builtIn="false" value="STM32"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
<listOptionValue builtIn="false" value="STM32F103xB"/>
<listOptionValue builtIn="false" value="USE_RTOS_SYSTICK"/>
</option>
<option id="com.atollic.truestudio.as.general.incpath.873601990" name="Include path" superClass="com.atollic.truestudio.as.general.incpath" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM3&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\Middlewares\Third_Party\FreeRTOS\Source\include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\Middlewares\Third_Party\FreeRTOS\Source\portable&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\HAL_Driver\Inc\Legacy&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\inc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\HAL_Driver\Inc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\CMSIS\core&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\CMSIS\device&quot;"/>
</option>
<option id="com.atollic.truestudio.common_options.target.interwork.936472392" name="Mix ARM/Thumb" superClass="com.atollic.truestudio.common_options.target.interwork" useByScannerDiscovery="false"/>
<inputType id="com.atollic.truestudio.as.input.129375893" name="Input" superClass="com.atollic.truestudio.as.input"/>
</tool>
<tool command="arm-atollic-eabi-gcc -c" commandLinePattern="${COMMAND} ${INPUTS} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="com.atollic.truestudio.exe.release.toolchain.gcc.1332975164" name="C Compiler" superClass="com.atollic.truestudio.exe.release.toolchain.gcc">
<option id="com.atollic.truestudio.gcc.symbols.defined.1919402724" name="Defined symbols" superClass="com.atollic.truestudio.gcc.symbols.defined" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="STM32F103T8Ux"/>
<listOptionValue builtIn="false" value="LOCAL_BUILD"/>
<listOptionValue builtIn="false" value="MODEL_TS100"/>
<listOptionValue builtIn="false" value="STM32F1"/>
<listOptionValue builtIn="false" value="STM32"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
<listOptionValue builtIn="false" value="STM32F103xB"/>
<listOptionValue builtIn="false" value="USE_RTOS_SYSTICK"/>
</option>
<option id="com.atollic.truestudio.gcc.directories.select.777721863" name="Include path" superClass="com.atollic.truestudio.gcc.directories.select" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM3&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\Middlewares\Third_Party\FreeRTOS\Source\include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\Middlewares\Third_Party\FreeRTOS\Source\portable&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\HAL_Driver\Inc\Legacy&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\inc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\HAL_Driver\Inc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\CMSIS\core&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\CMSIS\device&quot;"/>
</option>
<option id="com.atollic.truestudio.common_options.target.endianess.1398679252" name="Endianess" superClass="com.atollic.truestudio.common_options.target.endianess" useByScannerDiscovery="false"/>
<option id="com.atollic.truestudio.common_options.target.mcpu.216657505" name="Microcontroller" superClass="com.atollic.truestudio.common_options.target.mcpu" useByScannerDiscovery="false" value="STM32F103T8" valueType="enumerated"/>
<option id="com.atollic.truestudio.common_options.target.instr_set.517024600" name="Instruction set" superClass="com.atollic.truestudio.common_options.target.instr_set" useByScannerDiscovery="false" value="com.atollic.truestudio.common_options.target.instr_set.thumb2" valueType="enumerated"/>
<option id="com.atollic.truestudio.common_options.target.fpucore.1295693572" name="FPU" superClass="com.atollic.truestudio.common_options.target.fpucore" useByScannerDiscovery="false" value="com.atollic.truestudio.common_options.target.fpucore.None" valueType="enumerated"/>
<option id="com.atollic.truestudio.common_options.target.fpu.513113282" name="Floating point" superClass="com.atollic.truestudio.common_options.target.fpu" useByScannerDiscovery="false"/>
<option id="com.atollic.truestudio.gcc.optimization.prep_garbage.3269428" name="Prepare dead code removal " superClass="com.atollic.truestudio.gcc.optimization.prep_garbage" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.atollic.truestudio.gcc.optimization.prep_data.1494329913" name="Prepare dead data removal" superClass="com.atollic.truestudio.gcc.optimization.prep_data" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.atollic.truestudio.exe.release.toolchain.gcc.debug.info.774134544" name="Debug Level" superClass="com.atollic.truestudio.exe.release.toolchain.gcc.debug.info" useByScannerDiscovery="false" value="com.atollic.truestudio.gcc.debug.info.3" valueType="enumerated"/>
<option id="com.atollic.truestudio.gcc.warnings.extra.923955337" name="Enable extra warning flags" superClass="com.atollic.truestudio.gcc.warnings.extra" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.atollic.truestudio.common_options.target.interwork.705166935" name="Mix ARM/Thumb" superClass="com.atollic.truestudio.common_options.target.interwork" useByScannerDiscovery="false"/>
<inputType id="com.atollic.truestudio.gcc.input.972201280" superClass="com.atollic.truestudio.gcc.input"/>
</tool>
<tool id="com.atollic.truestudio.exe.release.toolchain.ld.1724584550" name="C Linker" superClass="com.atollic.truestudio.exe.release.toolchain.ld">
<option id="com.atollic.truestudio.common_options.target.endianess.1048736100" name="Endianess" superClass="com.atollic.truestudio.common_options.target.endianess"/>
<option id="com.atollic.truestudio.common_options.target.mcpu.1288284258" name="Microcontroller" superClass="com.atollic.truestudio.common_options.target.mcpu" value="STM32F103T8" valueType="enumerated"/>
<option id="com.atollic.truestudio.common_options.target.instr_set.18065699" name="Instruction set" superClass="com.atollic.truestudio.common_options.target.instr_set" value="com.atollic.truestudio.common_options.target.instr_set.thumb2" valueType="enumerated"/>
<option id="com.atollic.truestudio.common_options.target.fpucore.1881059567" name="FPU" superClass="com.atollic.truestudio.common_options.target.fpucore" value="com.atollic.truestudio.common_options.target.fpucore.None" valueType="enumerated"/>
<option id="com.atollic.truestudio.common_options.target.fpu.1491233159" name="Floating point" superClass="com.atollic.truestudio.common_options.target.fpu"/>
<option id="com.atollic.truestudio.ld.general.scriptfile.1002254715" name="Linker script" superClass="com.atollic.truestudio.ld.general.scriptfile" value="../stm32_flash.ld" valueType="string"/>
<option id="com.atollic.truestudio.ld.optimization.do_garbage.240611247" name="Dead code removal " superClass="com.atollic.truestudio.ld.optimization.do_garbage" value="true" valueType="boolean"/>
<option id="com.atollic.truestudio.common_options.target.interwork.450818258" name="Mix ARM/Thumb" superClass="com.atollic.truestudio.common_options.target.interwork"/>
<option id="com.atollic.truestudio.ld.misc.genmapfile.824075230" name="Create map file" superClass="com.atollic.truestudio.ld.misc.genmapfile"/>
</tool>
<tool command="arm-atollic-eabi-g++ -c" commandLinePattern="${COMMAND} ${INPUTS} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="com.atollic.truestudio.exe.release.toolchain.gpp.1569179032" name="C++ Compiler" superClass="com.atollic.truestudio.exe.release.toolchain.gpp">
<option id="com.atollic.truestudio.gpp.symbols.defined.1174699371" name="Defined symbols" superClass="com.atollic.truestudio.gpp.symbols.defined" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="STM32F103T8Ux"/>
<listOptionValue builtIn="false" value="LOCAL_BUILD"/>
<listOptionValue builtIn="false" value="MODEL_TS100"/>
<listOptionValue builtIn="false" value="STM32F1"/>
<listOptionValue builtIn="false" value="STM32"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
<listOptionValue builtIn="false" value="STM32F103xB"/>
<listOptionValue builtIn="false" value="USE_RTOS_SYSTICK"/>
</option>
<option id="com.atollic.truestudio.gpp.directories.select.1805913285" name="Include path" superClass="com.atollic.truestudio.gpp.directories.select" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM3&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\Middlewares\Third_Party\FreeRTOS\Source\include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\Middlewares\Third_Party\FreeRTOS\Source\portable&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\HAL_Driver\Inc\Legacy&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\inc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\HAL_Driver\Inc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\CMSIS\core&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../TS100\CMSIS\device&quot;"/>
</option>
<option id="com.atollic.truestudio.common_options.target.endianess.180632323" name="Endianess" superClass="com.atollic.truestudio.common_options.target.endianess" useByScannerDiscovery="false"/>
<option id="com.atollic.truestudio.common_options.target.mcpu.226626499" name="Microcontroller" superClass="com.atollic.truestudio.common_options.target.mcpu" useByScannerDiscovery="false" value="STM32F103T8" valueType="enumerated"/>
<option id="com.atollic.truestudio.common_options.target.instr_set.332354095" name="Instruction set" superClass="com.atollic.truestudio.common_options.target.instr_set" useByScannerDiscovery="false" value="com.atollic.truestudio.common_options.target.instr_set.thumb2" valueType="enumerated"/>
<option id="com.atollic.truestudio.common_options.target.fpucore.411631450" name="FPU" superClass="com.atollic.truestudio.common_options.target.fpucore" useByScannerDiscovery="false" value="com.atollic.truestudio.common_options.target.fpucore.None" valueType="enumerated"/>
<option id="com.atollic.truestudio.common_options.target.fpu.2094033204" name="Floating point" superClass="com.atollic.truestudio.common_options.target.fpu" useByScannerDiscovery="false"/>
<option id="com.atollic.truestudio.gpp.optimization.prep_garbage.117526596" name="Prepare dead code removal" superClass="com.atollic.truestudio.gpp.optimization.prep_garbage" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.atollic.truestudio.gpp.optimization.prep_data.1064976160" name="Prepare dead data removal" superClass="com.atollic.truestudio.gpp.optimization.prep_data" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.atollic.truestudio.gpp.optimization.fno_rtti.605376730" name="Disable RTTI" superClass="com.atollic.truestudio.gpp.optimization.fno_rtti" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.atollic.truestudio.gpp.optimization.fno_exceptions.1694893093" name="Disable exception handling" superClass="com.atollic.truestudio.gpp.optimization.fno_exceptions" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.atollic.truestudio.exe.release.toolchain.gpp.debug.info.1750102532" name="Debug Level" superClass="com.atollic.truestudio.exe.release.toolchain.gpp.debug.info" useByScannerDiscovery="false" value="com.atollic.truestudio.gpp.debug.info.3" valueType="enumerated"/>
<option id="com.atollic.truestudio.gpp.warnings.extra.1904215621" name="Enable extra warning flags" superClass="com.atollic.truestudio.gpp.warnings.extra" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.atollic.truestudio.gpp.cppstandard.956269718" name="C++ standard" superClass="com.atollic.truestudio.gpp.cppstandard" useByScannerDiscovery="false" value="com.atollic.truestudio.gpp.cppstandard.gnupp14" valueType="enumerated"/>
<option id="com.atollic.truestudio.common_options.target.interwork.2090493213" name="Mix ARM/Thumb" superClass="com.atollic.truestudio.common_options.target.interwork" useByScannerDiscovery="false"/>
<inputType id="com.atollic.truestudio.gpp.input.1570929745" superClass="com.atollic.truestudio.gpp.input"/>
</tool>
<tool command="arm-atollic-eabi-g++" commandLinePattern="${COMMAND} ${OUTPUT_FLAG} ${OUTPUT} ${INPUTS} ${FLAGS}" errorParsers="org.eclipse.cdt.core.GLDErrorParser" id="com.atollic.truestudio.exe.release.toolchain.ldcc.685067687" name="C++ Linker" superClass="com.atollic.truestudio.exe.release.toolchain.ldcc">
<option id="com.atollic.truestudio.common_options.target.endianess.1475149192" name="Endianess" superClass="com.atollic.truestudio.common_options.target.endianess" useByScannerDiscovery="false"/>
<option id="com.atollic.truestudio.common_options.target.mcpu.883743606" name="Microcontroller" superClass="com.atollic.truestudio.common_options.target.mcpu" useByScannerDiscovery="false" value="STM32F103T8" valueType="enumerated"/>
<option id="com.atollic.truestudio.common_options.target.instr_set.1437340631" name="Instruction set" superClass="com.atollic.truestudio.common_options.target.instr_set" useByScannerDiscovery="false" value="com.atollic.truestudio.common_options.target.instr_set.thumb2" valueType="enumerated"/>
<option id="com.atollic.truestudio.common_options.target.fpucore.1728249327" name="FPU" superClass="com.atollic.truestudio.common_options.target.fpucore" useByScannerDiscovery="false" value="com.atollic.truestudio.common_options.target.fpucore.None" valueType="enumerated"/>
<option id="com.atollic.truestudio.common_options.target.fpu.836905279" name="Floating point" superClass="com.atollic.truestudio.common_options.target.fpu" useByScannerDiscovery="false"/>
<option id="com.atollic.truestudio.ldcc.optimization.do_garbage.919153144" name="Dead code removal" superClass="com.atollic.truestudio.ldcc.optimization.do_garbage" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.atollic.truestudio.ldcc.general.scriptfile.707909104" name="Linker script" superClass="com.atollic.truestudio.ldcc.general.scriptfile" useByScannerDiscovery="false" value="${workspace_loc:/${ProjName}}/../TS100/LinkerScript.ld" valueType="string"/>
<option id="com.atollic.truestudio.ldcc.misc.linkerflags.2099608034" name="Other options" superClass="com.atollic.truestudio.ldcc.misc.linkerflags" useByScannerDiscovery="false" value="-Wl,-cref,-u,Reset_Handler,-lm -Os -flto -Wl,--undefined=vTaskSwitchContext" valueType="string"/>
<option id="com.atollic.truestudio.ldcc.optimization.malloc_page_size.1762509052" name="Page size allocation for malloc() " superClass="com.atollic.truestudio.ldcc.optimization.malloc_page_size" useByScannerDiscovery="false" value="com.atollic.truestudio.ldcc.optimization.malloc_page_size.128" valueType="enumerated"/>
<option id="com.atollic.truestudio.common_options.target.interwork.1607969085" name="Mix ARM/Thumb" superClass="com.atollic.truestudio.common_options.target.interwork" useByScannerDiscovery="false"/>
<option id="com.atollic.truestudio.ldcc.misc.genmapfile.1321734634" name="Create map file" superClass="com.atollic.truestudio.ldcc.misc.genmapfile" useByScannerDiscovery="false"/>
<inputType id="com.atollic.truestudio.ldcc.input.1970565411" name="Input" superClass="com.atollic.truestudio.ldcc.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="com.atollic.truestudio.ar.base.1980044389" name="Archiver" superClass="com.atollic.truestudio.ar.base"/>
<tool command="arm-atollic-reports.jar" commandLinePattern="${COMMAND} ${FLAGS} ${INPUTS}" errorParsers="" id="com.atollic.truestudio.exe.release.toolchain.secoutput.1782930068" name="Other" superClass="com.atollic.truestudio.exe.release.toolchain.secoutput">
<option id="com.atollic.truestudio.secoutput.general.convert.1196746231" name="Convert build output" superClass="com.atollic.truestudio.secoutput.general.convert" useByScannerDiscovery="false" value="true" valueType="boolean"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="TS100A.com.atollic.truestudio.exe.1757612526" name="Executable" projectType="com.atollic.truestudio.exe"/>
@@ -325,6 +485,7 @@
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="TS100"/>
<configuration configurationName="TS100_LOCAL"/>
<configuration configurationName="Release">
<resource resourceType="PROJECT" workspacePath="/TS100A"/>
</configuration>

View File

@@ -1,2 +1,3 @@
/Release/
/TS100/
/TS100_LOCAL/

View File

@@ -4,7 +4,7 @@
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="com.atollic.truestudio.mbs.GCCSpecsDetectorAtollicArm" console="false" env-hash="1636694427566673783" id="com.atollic.truestudio.mbs.provider" keep-relative-paths="false" name="Atollic ARM Tools Language Settings" parameter="${COMMAND} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="com.atollic.truestudio.mbs.GCCSpecsDetectorAtollicArm" console="false" env-hash="-167355215276254258" id="com.atollic.truestudio.mbs.provider" keep-relative-paths="false" name="Atollic ARM Tools Language Settings" parameter="${COMMAND} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
@@ -14,7 +14,17 @@
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="com.atollic.truestudio.mbs.GCCSpecsDetectorAtollicArm" console="false" env-hash="1636694427566673783" id="com.atollic.truestudio.mbs.provider" keep-relative-paths="false" name="Atollic ARM Tools Language Settings" parameter="${COMMAND} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="com.atollic.truestudio.mbs.GCCSpecsDetectorAtollicArm" console="false" env-hash="-167355215276254258" id="com.atollic.truestudio.mbs.provider" keep-relative-paths="false" name="Atollic ARM Tools Language Settings" parameter="${COMMAND} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
<configuration id="com.atollic.truestudio.configuration.release.200032419.2005314669.1746279461" name="TS100_LOCAL">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="com.atollic.truestudio.mbs.GCCSpecsDetectorAtollicArm" console="false" env-hash="-167355215276254258" id="com.atollic.truestudio.mbs.provider" keep-relative-paths="false" name="Atollic ARM Tools Language Settings" parameter="${COMMAND} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>

View File

@@ -1,4 +1,10 @@
eclipse.preferences.version=1
environment/buildEnvironmentInclude/com.atollic.truestudio.configuration.release.200032419.2005314669.1746279461/CPATH/delimiter=;
environment/buildEnvironmentInclude/com.atollic.truestudio.configuration.release.200032419.2005314669.1746279461/CPATH/operation=remove
environment/buildEnvironmentInclude/com.atollic.truestudio.configuration.release.200032419.2005314669.1746279461/C_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/com.atollic.truestudio.configuration.release.200032419.2005314669.1746279461/C_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/com.atollic.truestudio.configuration.release.200032419.2005314669.1746279461/append=true
environment/buildEnvironmentInclude/com.atollic.truestudio.configuration.release.200032419.2005314669.1746279461/appendContributed=true
environment/buildEnvironmentInclude/com.atollic.truestudio.configuration.release.200032419.2005314669/CPATH/delimiter=;
environment/buildEnvironmentInclude/com.atollic.truestudio.configuration.release.200032419.2005314669/CPATH/operation=remove
environment/buildEnvironmentInclude/com.atollic.truestudio.configuration.release.200032419.2005314669/C_INCLUDE_PATH/delimiter=;
@@ -11,6 +17,10 @@ environment/buildEnvironmentInclude/com.atollic.truestudio.configuration.release
environment/buildEnvironmentInclude/com.atollic.truestudio.configuration.release.200032419/C_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/com.atollic.truestudio.configuration.release.200032419/append=true
environment/buildEnvironmentInclude/com.atollic.truestudio.configuration.release.200032419/appendContributed=true
environment/buildEnvironmentLibrary/com.atollic.truestudio.configuration.release.200032419.2005314669.1746279461/LIBRARY_PATH/delimiter=;
environment/buildEnvironmentLibrary/com.atollic.truestudio.configuration.release.200032419.2005314669.1746279461/LIBRARY_PATH/operation=remove
environment/buildEnvironmentLibrary/com.atollic.truestudio.configuration.release.200032419.2005314669.1746279461/append=true
environment/buildEnvironmentLibrary/com.atollic.truestudio.configuration.release.200032419.2005314669.1746279461/appendContributed=true
environment/buildEnvironmentLibrary/com.atollic.truestudio.configuration.release.200032419.2005314669/LIBRARY_PATH/delimiter=;
environment/buildEnvironmentLibrary/com.atollic.truestudio.configuration.release.200032419.2005314669/LIBRARY_PATH/operation=remove
environment/buildEnvironmentLibrary/com.atollic.truestudio.configuration.release.200032419.2005314669/append=true

View File

@@ -1,2 +1,3 @@
eclipse.preferences.version=1
encoding//inc/Font.h=UTF-8
encoding//src/Translation.cpp=UTF-8

View File

@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="com.atollic.hardwaredebug.launch.launchConfigurationType">
<stringAttribute key="com.atollic.hardwaredebug.jlink_common.cpu_core" value="Cortex-M"/>
<stringAttribute key="com.atollic.hardwaredebug.jlink_common.device" value="STM32F103T8"/>
<stringAttribute key="com.atollic.hardwaredebug.jlink_common.endian" value="little"/>
<stringAttribute key="com.atollic.hardwaredebug.jlink_common.init_speed" value="4000"/>
<booleanAttribute key="com.atollic.hardwaredebug.jlink_common.jlink_check_serial_number" value="false"/>
<stringAttribute key="com.atollic.hardwaredebug.jlink_common.jlink_script_path" value=""/>
<booleanAttribute key="com.atollic.hardwaredebug.jlink_common.jlink_script_used" value="false"/>
<stringAttribute key="com.atollic.hardwaredebug.jlink_common.jlink_trace_port_cfg_path" value="C:\Program Files (x86)\Atollic\TrueSTUDIO for STM32 9.1.0\ide\plugins\com.atollic.truestudio.tsp.stm32_1.0.0.20181011-1241\tsp\etm\stm32f1xx.init"/>
<stringAttribute key="com.atollic.hardwaredebug.jlink_common.jlink_txt_serial_number" value=""/>
<booleanAttribute key="com.atollic.hardwaredebug.jlink_common.scan_chain_auto" value="true"/>
<intAttribute key="com.atollic.hardwaredebug.jlink_common.scan_chain_irpre" value="0"/>
<intAttribute key="com.atollic.hardwaredebug.jlink_common.scan_chain_pos" value="0"/>
<stringAttribute key="com.atollic.hardwaredebug.jlink_common.selected_rtos" value="No RTOS"/>
<intAttribute key="com.atollic.hardwaredebug.launch.formatVersion" value="2"/>
<stringAttribute key="com.atollic.hardwaredebug.launch.hwinitCommands" value="# Initialize your hardware here&#10;"/>
<stringAttribute key="com.atollic.hardwaredebug.launch.ipAddress" value="localhost"/>
<stringAttribute key="com.atollic.hardwaredebug.launch.jtagDevice" value="ST-LINK"/>
<intAttribute key="com.atollic.hardwaredebug.launch.portNumber" value="61234"/>
<stringAttribute key="com.atollic.hardwaredebug.launch.remoteCommand" value="target extended-remote"/>
<stringAttribute key="com.atollic.hardwaredebug.launch.runCommands" value="# Set flash parallelism mode to 32, 16, or 8 bit when using STM32 F2/F4 microcontrollers&#10;# Uncomment next line, 2=32 bit, 1=16 bit and 0=8 bit parallelism mode&#10;#monitor flash set_parallelism_mode 2&#10;&#10;# Set character encoding&#10;set host-charset CP1252&#10;set target-charset CP1252&#10;&#10;# Reset to known state&#10;monitor reset&#10;&#10;# Load the program executable&#10;load&#9;&#9;&#10;&#10;# Reset the chip to get to a known state. Remove &quot;monitor reset&quot; command &#10;# if the code is not located at default address and does not run by reset. &#10;monitor reset&#10;&#10;# Enable Debug connection in low power modes (DBGMCU-&gt;CR)&#10;set *0xE0042004 = (*0xE0042004) | 0x7&#10;# Set a breakpoint at main().&#10;tbreak main&#10;&#10;# Run to the breakpoint.&#10;continue"/>
<stringAttribute key="com.atollic.hardwaredebug.launch.serverParam" value="-p 61234 -l 1 -d -s -cp &quot;C:\Program Files (x86)\Atollic\TrueSTUDIO for STM32 9.1.0\Servers\STM32CubeProgrammer\bin&quot;"/>
<booleanAttribute key="com.atollic.hardwaredebug.launch.startServer" value="true"/>
<booleanAttribute key="com.atollic.hardwaredebug.launch.swd_mode" value="true"/>
<stringAttribute key="com.atollic.hardwaredebug.launch.swv_port" value="61235"/>
<stringAttribute key="com.atollic.hardwaredebug.launch.swv_trace_div" value="8"/>
<stringAttribute key="com.atollic.hardwaredebug.launch.swv_trace_hclk" value="8000000"/>
<booleanAttribute key="com.atollic.hardwaredebug.launch.swv_wait_for_sync" value="true"/>
<intAttribute key="com.atollic.hardwaredebug.launch.trace_system" value="0"/>
<booleanAttribute key="com.atollic.hardwaredebug.launch.useRemoteTarget" value="true"/>
<booleanAttribute key="com.atollic.hardwaredebug.launch.verify_flash_download" value="true"/>
<booleanAttribute key="com.atollic.hardwaredebug.stlink.enable_external_loader" value="false"/>
<booleanAttribute key="com.atollic.hardwaredebug.stlink.enable_logging" value="false"/>
<stringAttribute key="com.atollic.hardwaredebug.stlink.external_loader" value=""/>
<stringAttribute key="com.atollic.hardwaredebug.stlink.log_file" value="C:\Users\Ralim.DESKTOP-R877O7F\Documents\GitHub\ts100\workspace\TS100A\Debug\st-link_gdbserver_log.txt"/>
<booleanAttribute key="com.atollic.hardwaredebug.stlink.stlink_check_serial_number" value="false"/>
<stringAttribute key="com.atollic.hardwaredebug.stlink.stlink_txt_serial_number" value=""/>
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="${TOOLCHAIN_PATH}/arm-atollic-eabi-gdb"/>
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="TS100_LOCAL/TS100A.elf"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="TS100A"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value=""/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/TS100A"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;/&gt;&#13;&#10;"/>
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
</launchConfiguration>