aboutsummaryrefslogtreecommitdiffhomepage
path: root/Development Resources
diff options
context:
space:
mode:
authorBen V. Brown <[email protected]>2018-09-17 22:18:39 +1000
committerGitHub <[email protected]>2018-09-17 22:18:39 +1000
commit056353ed6ac98e68ce5c43377e85f42a173f9a0b (patch)
treee210ecfd0afdaded9d1e1176bf61e2224819f289 /Development Resources
parentb3947ccc1c3028fd595ad480f802c99f5bd84d8d (diff)
downloadIronOS-056353ed6ac98e68ce5c43377e85f42a173f9a0b.tar.gz
IronOS-056353ed6ac98e68ce5c43377e85f42a173f9a0b.zip
Adding adc2 & new temperature calibration proceedures. [WiP] (#361)
* Add rough calls to ADC2 [untested] * Using dual ADC injected modes * Start both ADCs * Move some IRQ's to ram exec * Stabilize PID a bit more * Add in ideas for tip type selection * Add tiptype formula / settings struct * Add function ids to the settings menu * Rough tip selection * Rough out new cal routine for simple tips * Hardware test is fairly close for first pass * Add Simple calibration case [UNTESTED] This adds the calibration option that uses boiling water to the calibration menu. This is untested, and may need gain adjustments before use. * Simple Cal Roughly working * Rough out advanced cal
Diffstat (limited to 'Development Resources')
-rw-r--r--Development Resources/TS100/TS100.ioc136
1 files changed, 85 insertions, 51 deletions
diff --git a/Development Resources/TS100/TS100.ioc b/Development Resources/TS100/TS100.ioc
index c79fdcc2..77ff394f 100644
--- a/Development Resources/TS100/TS100.ioc
+++ b/Development Resources/TS100/TS100.ioc
@@ -11,13 +11,15 @@ ADC1.DiscontinuousConvMode=DISABLE
ADC1.EnableAnalogWatchDog=false
ADC1.EnableRegularConversion=ENABLE
ADC1.ExternalTrigConv=ADC_SOFTWARE_START
-ADC1.ExternalTrigInjecConv=ADC_EXTERNALTRIGINJECCONV_T3_CC4
-ADC1.IPParameters=Rank-0\#ChannelRegularConversion,Channel-0\#ChannelRegularConversion,SamplingTime-0\#ChannelRegularConversion,NbrOfConversionFlag,DataAlign,ScanConvMode,ContinuousConvMode,DiscontinuousConvMode,EnableRegularConversion,NbrOfConversion,ExternalTrigConv,InjNumberOfConversion,EnableAnalogWatchDog,Rank-1\#ChannelRegularConversion,Channel-1\#ChannelRegularConversion,SamplingTime-1\#ChannelRegularConversion,master,Rank-2\#ChannelInjectedConversion,Channel-2\#ChannelInjectedConversion,SamplingTime-2\#ChannelInjectedConversion,InjectedOffset-2\#ChannelInjectedConversion,Rank-3\#ChannelInjectedConversion,Channel-3\#ChannelInjectedConversion,SamplingTime-3\#ChannelInjectedConversion,InjectedOffset-3\#ChannelInjectedConversion,Rank-4\#ChannelInjectedConversion,Channel-4\#ChannelInjectedConversion,SamplingTime-4\#ChannelInjectedConversion,InjectedOffset-4\#ChannelInjectedConversion,Rank-5\#ChannelInjectedConversion,Channel-5\#ChannelInjectedConversion,SamplingTime-5\#ChannelInjectedConversion,InjectedOffset-5\#ChannelInjectedConversion,ExternalTrigInjecConv
+ADC1.ExternalTrigInjecConv=ADC_EXTERNALTRIGINJECCONV_T2_CC1
+ADC1.IPParameters=Rank-0\#ChannelRegularConversion,Channel-0\#ChannelRegularConversion,SamplingTime-0\#ChannelRegularConversion,NbrOfConversionFlag,DataAlign,ScanConvMode,ContinuousConvMode,DiscontinuousConvMode,EnableRegularConversion,NbrOfConversion,ExternalTrigConv,InjNumberOfConversion,EnableAnalogWatchDog,Rank-1\#ChannelRegularConversion,Channel-1\#ChannelRegularConversion,SamplingTime-1\#ChannelRegularConversion,master,Rank-2\#ChannelInjectedConversion,Channel-2\#ChannelInjectedConversion,SamplingTime-2\#ChannelInjectedConversion,InjectedOffset-2\#ChannelInjectedConversion,Rank-3\#ChannelInjectedConversion,Channel-3\#ChannelInjectedConversion,SamplingTime-3\#ChannelInjectedConversion,InjectedOffset-3\#ChannelInjectedConversion,Rank-4\#ChannelInjectedConversion,Channel-4\#ChannelInjectedConversion,SamplingTime-4\#ChannelInjectedConversion,InjectedOffset-4\#ChannelInjectedConversion,Rank-5\#ChannelInjectedConversion,Channel-5\#ChannelInjectedConversion,SamplingTime-5\#ChannelInjectedConversion,InjectedOffset-5\#ChannelInjectedConversion,ExternalTrigInjecConv,InjectedConvMode,Mode
ADC1.InjNumberOfConversion=4
+ADC1.InjectedConvMode=None
ADC1.InjectedOffset-2\#ChannelInjectedConversion=0
ADC1.InjectedOffset-3\#ChannelInjectedConversion=0
ADC1.InjectedOffset-4\#ChannelInjectedConversion=0
ADC1.InjectedOffset-5\#ChannelInjectedConversion=0
+ADC1.Mode=ADC_DUALMODE_REGSIMULT_INJECSIMULT
ADC1.NbrOfConversion=2
ADC1.NbrOfConversionFlag=1
ADC1.Rank-0\#ChannelRegularConversion=1
@@ -34,36 +36,67 @@ ADC1.SamplingTime-4\#ChannelInjectedConversion=ADC_SAMPLETIME_239CYCLES_5
ADC1.SamplingTime-5\#ChannelInjectedConversion=ADC_SAMPLETIME_71CYCLES_5
ADC1.ScanConvMode=ADC_SCAN_ENABLE
ADC1.master=1
-Dma.ADC1.0.Direction=DMA_PERIPH_TO_MEMORY
-Dma.ADC1.0.Instance=DMA1_Channel1
-Dma.ADC1.0.MemDataAlignment=DMA_MDATAALIGN_HALFWORD
-Dma.ADC1.0.MemInc=DMA_MINC_ENABLE
-Dma.ADC1.0.Mode=DMA_CIRCULAR
-Dma.ADC1.0.PeriphDataAlignment=DMA_PDATAALIGN_HALFWORD
-Dma.ADC1.0.PeriphInc=DMA_PINC_DISABLE
-Dma.ADC1.0.Priority=DMA_PRIORITY_VERY_HIGH
-Dma.ADC1.0.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority
-Dma.I2C1_RX.1.Direction=DMA_PERIPH_TO_MEMORY
-Dma.I2C1_RX.1.Instance=DMA1_Channel7
-Dma.I2C1_RX.1.MemDataAlignment=DMA_MDATAALIGN_BYTE
-Dma.I2C1_RX.1.MemInc=DMA_MINC_ENABLE
-Dma.I2C1_RX.1.Mode=DMA_NORMAL
-Dma.I2C1_RX.1.PeriphDataAlignment=DMA_PDATAALIGN_BYTE
-Dma.I2C1_RX.1.PeriphInc=DMA_PINC_DISABLE
-Dma.I2C1_RX.1.Priority=DMA_PRIORITY_MEDIUM
-Dma.I2C1_RX.1.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority
-Dma.I2C1_TX.2.Direction=DMA_MEMORY_TO_PERIPH
-Dma.I2C1_TX.2.Instance=DMA1_Channel6
-Dma.I2C1_TX.2.MemDataAlignment=DMA_MDATAALIGN_BYTE
-Dma.I2C1_TX.2.MemInc=DMA_MINC_ENABLE
-Dma.I2C1_TX.2.Mode=DMA_NORMAL
-Dma.I2C1_TX.2.PeriphDataAlignment=DMA_PDATAALIGN_BYTE
-Dma.I2C1_TX.2.PeriphInc=DMA_PINC_DISABLE
-Dma.I2C1_TX.2.Priority=DMA_PRIORITY_MEDIUM
-Dma.I2C1_TX.2.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority
-Dma.Request0=ADC1
-Dma.Request1=I2C1_RX
-Dma.Request2=I2C1_TX
+ADC2.Channel-0\#ChannelRegularConversion=ADC_CHANNEL_8
+ADC2.Channel-1\#ChannelInjectedConversion=ADC_CHANNEL_8
+ADC2.Channel-2\#ChannelInjectedConversion=ADC_CHANNEL_8
+ADC2.Channel-3\#ChannelInjectedConversion=ADC_CHANNEL_8
+ADC2.Channel-4\#ChannelInjectedConversion=ADC_CHANNEL_8
+ADC2.ContinuousConvMode=DISABLE
+ADC2.DataAlign=ADC_DATAALIGN_RIGHT
+ADC2.DiscontinuousConvMode=DISABLE
+ADC2.EnableAnalogWatchDog=false
+ADC2.EnableRegularConversion=ENABLE
+ADC2.IPParameters=Rank-0\#ChannelRegularConversion,Channel-0\#ChannelRegularConversion,SamplingTime-0\#ChannelRegularConversion,NbrOfConversionFlag,Rank-1\#ChannelInjectedConversion,Channel-1\#ChannelInjectedConversion,SamplingTime-1\#ChannelInjectedConversion,InjectedOffset-1\#ChannelInjectedConversion,Rank-2\#ChannelInjectedConversion,Channel-2\#ChannelInjectedConversion,SamplingTime-2\#ChannelInjectedConversion,InjectedOffset-2\#ChannelInjectedConversion,Rank-3\#ChannelInjectedConversion,Channel-3\#ChannelInjectedConversion,SamplingTime-3\#ChannelInjectedConversion,InjectedOffset-3\#ChannelInjectedConversion,Rank-4\#ChannelInjectedConversion,Channel-4\#ChannelInjectedConversion,SamplingTime-4\#ChannelInjectedConversion,InjectedOffset-4\#ChannelInjectedConversion,InjNumberOfConversion,Mode,DataAlign,ScanConvMode,ContinuousConvMode,DiscontinuousConvMode,EnableRegularConversion,NbrOfConversion,InjectedConvMode,EnableAnalogWatchDog
+ADC2.InjNumberOfConversion=4
+ADC2.InjectedConvMode=None
+ADC2.InjectedOffset-1\#ChannelInjectedConversion=0
+ADC2.InjectedOffset-2\#ChannelInjectedConversion=0
+ADC2.InjectedOffset-3\#ChannelInjectedConversion=0
+ADC2.InjectedOffset-4\#ChannelInjectedConversion=0
+ADC2.Mode=ADC_DUALMODE_REGSIMULT_INJECSIMULT
+ADC2.NbrOfConversion=1
+ADC2.NbrOfConversionFlag=1
+ADC2.Rank-0\#ChannelRegularConversion=1
+ADC2.Rank-1\#ChannelInjectedConversion=1
+ADC2.Rank-2\#ChannelInjectedConversion=2
+ADC2.Rank-3\#ChannelInjectedConversion=3
+ADC2.Rank-4\#ChannelInjectedConversion=4
+ADC2.SamplingTime-0\#ChannelRegularConversion=ADC_SAMPLETIME_1CYCLE_5
+ADC2.SamplingTime-1\#ChannelInjectedConversion=ADC_SAMPLETIME_1CYCLE_5
+ADC2.SamplingTime-2\#ChannelInjectedConversion=ADC_SAMPLETIME_1CYCLE_5
+ADC2.SamplingTime-3\#ChannelInjectedConversion=ADC_SAMPLETIME_1CYCLE_5
+ADC2.SamplingTime-4\#ChannelInjectedConversion=ADC_SAMPLETIME_1CYCLE_5
+ADC2.ScanConvMode=ADC_SCAN_ENABLE
+Dma.ADC1.2.Direction=DMA_PERIPH_TO_MEMORY
+Dma.ADC1.2.Instance=DMA1_Channel1
+Dma.ADC1.2.MemDataAlignment=DMA_MDATAALIGN_HALFWORD
+Dma.ADC1.2.MemInc=DMA_MINC_ENABLE
+Dma.ADC1.2.Mode=DMA_CIRCULAR
+Dma.ADC1.2.PeriphDataAlignment=DMA_PDATAALIGN_HALFWORD
+Dma.ADC1.2.PeriphInc=DMA_PINC_DISABLE
+Dma.ADC1.2.Priority=DMA_PRIORITY_VERY_HIGH
+Dma.ADC1.2.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority
+Dma.I2C1_RX.0.Direction=DMA_PERIPH_TO_MEMORY
+Dma.I2C1_RX.0.Instance=DMA1_Channel7
+Dma.I2C1_RX.0.MemDataAlignment=DMA_MDATAALIGN_BYTE
+Dma.I2C1_RX.0.MemInc=DMA_MINC_ENABLE
+Dma.I2C1_RX.0.Mode=DMA_NORMAL
+Dma.I2C1_RX.0.PeriphDataAlignment=DMA_PDATAALIGN_BYTE
+Dma.I2C1_RX.0.PeriphInc=DMA_PINC_DISABLE
+Dma.I2C1_RX.0.Priority=DMA_PRIORITY_MEDIUM
+Dma.I2C1_RX.0.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority
+Dma.I2C1_TX.1.Direction=DMA_MEMORY_TO_PERIPH
+Dma.I2C1_TX.1.Instance=DMA1_Channel6
+Dma.I2C1_TX.1.MemDataAlignment=DMA_MDATAALIGN_BYTE
+Dma.I2C1_TX.1.MemInc=DMA_MINC_ENABLE
+Dma.I2C1_TX.1.Mode=DMA_NORMAL
+Dma.I2C1_TX.1.PeriphDataAlignment=DMA_PDATAALIGN_BYTE
+Dma.I2C1_TX.1.PeriphInc=DMA_PINC_DISABLE
+Dma.I2C1_TX.1.Priority=DMA_PRIORITY_MEDIUM
+Dma.I2C1_TX.1.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority
+Dma.Request0=I2C1_RX
+Dma.Request1=I2C1_TX
+Dma.Request2=ADC1
Dma.RequestsNb=3
FREERTOS.FootprintOK=true
FREERTOS.INCLUDE_vTaskDelete=0
@@ -82,16 +115,17 @@ IWDG.Prescaler=IWDG_PRESCALER_256
KeepUserPlacement=false
Mcu.Family=STM32F1
Mcu.IP0=ADC1
-Mcu.IP1=DMA
-Mcu.IP2=FREERTOS
-Mcu.IP3=I2C1
-Mcu.IP4=IWDG
-Mcu.IP5=NVIC
-Mcu.IP6=RCC
-Mcu.IP7=SYS
-Mcu.IP8=TIM2
-Mcu.IP9=TIM3
-Mcu.IPNb=10
+Mcu.IP1=ADC2
+Mcu.IP10=TIM3
+Mcu.IP2=DMA
+Mcu.IP3=FREERTOS
+Mcu.IP4=I2C1
+Mcu.IP5=IWDG
+Mcu.IP6=NVIC
+Mcu.IP7=RCC
+Mcu.IP8=SYS
+Mcu.IP9=TIM2
+Mcu.IPNb=11
Mcu.Name=STM32F103T(8-B)Ux
Mcu.Package=VFQFPN36
Mcu.Pin0=PA6
@@ -119,8 +153,8 @@ Mcu.PinsNb=21
Mcu.ThirdPartyNb=0
Mcu.UserConstants=
Mcu.UserName=STM32F103T8Ux
-MxCube.Version=4.25.0
-MxDb.Version=DB.4.0.250
+MxCube.Version=4.26.0
+MxDb.Version=DB.4.0.260
NVIC.ADC1_2_IRQn=true\:5\:0\:false\:false\:true\:true\:true
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:true
NVIC.DMA1_Channel1_IRQn=true\:5\:0\:false\:false\:true\:true\:true
@@ -204,7 +238,7 @@ ProjectManager.BackupPrevious=false
ProjectManager.CompilerOptimize=3
ProjectManager.ComputerToolchain=false
ProjectManager.CoupleFile=false
-ProjectManager.CustomerFirmwarePackage=C\:/Users/Ralim/STM32Cube/Repository/STM32Cube_FW_F1_V1.6.1
+ProjectManager.CustomerFirmwarePackage=
ProjectManager.DefaultFWLocation=true
ProjectManager.DeletePrevious=true
ProjectManager.DeviceId=STM32F103T8Ux
@@ -216,15 +250,15 @@ ProjectManager.KeepUserCode=true
ProjectManager.LastFirmware=true
ProjectManager.LibraryCopy=1
ProjectManager.MainLocation=Src
-ProjectManager.PreviousToolchain=SW4STM32
+ProjectManager.PreviousToolchain=TrueSTUDIO
ProjectManager.ProjectBuild=false
ProjectManager.ProjectFileName=TS100.ioc
ProjectManager.ProjectName=TS100
ProjectManager.StackSize=0x400
-ProjectManager.TargetToolchain=SW4STM32
+ProjectManager.TargetToolchain=TrueSTUDIO
ProjectManager.ToolChainLocation=
-ProjectManager.UnderRoot=false
-ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-MX_DMA_Init-DMA-false-HAL-true,3-MX_I2C1_Init-I2C1-false-HAL-true,4-MX_ADC1_Init-ADC1-false-HAL-true,5-SystemClock_Config-RCC-false-HAL-true,6-MX_TIM3_Init-TIM3-false-HAL-true,7-MX_IWDG_Init-IWDG-false-HAL-true,8-MX_TIM2_Init-TIM2-false-HAL-true
+ProjectManager.UnderRoot=true
+ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-MX_DMA_Init-DMA-false-HAL-true,3-MX_I2C1_Init-I2C1-false-HAL-true,4-MX_ADC1_Init-ADC1-false-HAL-true,5-SystemClock_Config-RCC-false-HAL-true,6-MX_TIM3_Init-TIM3-false-HAL-true,7-MX_IWDG_Init-IWDG-false-HAL-true,8-MX_TIM2_Init-TIM2-false-HAL-true,9-MX_ADC2_Init-ADC2-false-HAL-true
RCC.ADCFreqValue=8000000
RCC.ADCPresc=RCC_ADCPCLK2_DIV8
RCC.AHBFreq_Value=64000000
@@ -249,8 +283,8 @@ RCC.USBFreq_Value=42666666.666666664
RCC.USBPrescaler=RCC_USBCLKSOURCE_PLL_DIV1_5
SH.ADCx_IN7.0=ADC1_IN7,IN7
SH.ADCx_IN7.ConfNb=1
-SH.ADCx_IN8.0=ADC2_IN8
-SH.ADCx_IN8.1=ADC1_IN8,IN8
+SH.ADCx_IN8.0=ADC1_IN8,IN8
+SH.ADCx_IN8.1=ADC2_IN8,IN8
SH.ADCx_IN8.ConfNb=2
SH.ADCx_IN9.0=ADC2_IN9
SH.ADCx_IN9.1=ADC1_IN9,IN9