view Documentations/OSTC4_CPU1_F429.ioc @ 471:73da921869d9 fix-bat-2

bugfix: implement battery charge percentage in dive header This commit is (much) less trivial than the related 919e5cb51c92. First, rename the CCRmode attribute (corresponding to byte Ox59) of the SLogbookHeaderOSTC3. This byte (according to the hwOS interface document) does not contain any CCR related value, but it contains "battery information". Already since 2017, this byte is used from libdivecomputer to interface the charge percentage. So, its renamed from CCRmode to batteryCharge, to reflect its true purpose. Now, simply add a batteryCharge attribute to the SLogbookHeader (and see below why that is possible, without breaking things). The remaining changes are trivial to implement battery charge percentage in dive header. Caveat: do not get confused by the exact role of the individual logbook header types. SLogbookHeaderOSTC3 is the formal type of the logbook format that the OSTC4 produces. This format is supposed to identical to the format, as is used in hwOS for the series of small OSTCs. Only some values of attributes are different. For example, the OSTC4 supports VPM, so byte 0x79 (deco model used for this dive) also has a value for VPM. But the SLogbookHeader type, despite its name and structure, is *not* a true logbook header, as it includes attributes that are not available in the SLogbookHeaderOSTC3 formal header type. Signed-off-by: Jan Mulder <jan@jlmulder.nl>
author Jan Mulder <jlmulder@xs4all.nl>
date Wed, 22 Apr 2020 13:08:57 +0200
parents 7d1b61176708
children
line wrap: on
line source

#MicroXplorer Configuration settings - do not modify
#Fri May 22 13:40:39 CEST 2015
File.Version=5
KeepUserPlacement=false
Mcu.Family=STM32F4
Mcu.IP0=DMA2D
Mcu.IP1=FMC
Mcu.IP10=SPI5
Mcu.IP11=SYS
Mcu.IP12=USART1
Mcu.IP2=I2C1
Mcu.IP3=LTDC
Mcu.IP4=NVIC
Mcu.IP5=RCC
Mcu.IP6=RTC
Mcu.IP7=SPI1
Mcu.IP8=SPI2
Mcu.IP9=SPI3
Mcu.IPNb=13
Mcu.Name=STM32F429I(E-G-I)Tx
Mcu.Package=LQFP176
Mcu.Pin0=PE4
Mcu.Pin1=PE5
Mcu.Pin10=PF3
Mcu.Pin11=PF4
Mcu.Pin12=PF5
Mcu.Pin13=PF6
Mcu.Pin14=PF7
Mcu.Pin15=PF8
Mcu.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
Mcu.Pin80=PD1
Mcu.Pin81=PD3
Mcu.Pin82=PD6
Mcu.Pin83=PG11
Mcu.Pin84=PG12
Mcu.Pin85=PG15
Mcu.Pin86=PB3
Mcu.Pin87=PB6
Mcu.Pin88=PB7
Mcu.Pin89=PB8
Mcu.Pin9=PF2
Mcu.Pin90=PB9
Mcu.Pin91=PE0
Mcu.Pin92=PE1
Mcu.Pin93=PI4
Mcu.Pin94=PI6
Mcu.Pin95=VP_DMA2D_VS_DMA2D
Mcu.Pin96=VP_RTC_VS_RTC_Alarm_A_Intern
Mcu.PinsNb=97
Mcu.UserName=STM32F429IITx
MxCube.Version=4.7.1
MxDb.Version=DB.4.0.71
NVIC.PriorityGroup=NVIC_PRIORITYGROUP_2
NVIC.SysTick_IRQn=true\:0\:0\:true
PA0/WKUP.Mode=SYS-WakeUp
PA0/WKUP.Signal=SYS_WKUP
PA10.Mode=Asynchronous
PA10.Signal=USART1_RX
PA13.Mode=Trace-Asynchronous_SW
PA13.Signal=SYS_JTMS-SWDIO
PA14.Mode=Trace-Asynchronous_SW
PA14.Signal=SYS_JTCK-SWCLK
PA15.Mode=NSS_Signal_Hard
PA15.Signal=SPI3_NSS
PA3.Mode=RGB888
PA3.Signal=LTDC_B5
PA4.Mode=NSS_Signal_Hard
PA4.Signal=SPI1_NSS
PA5.Mode=Full_Duplex_Master
PA5.Signal=SPI1_SCK
PA6.Mode=Full_Duplex_Master
PA6.Signal=SPI1_MISO
PA7.Mode=Full_Duplex_Master
PA7.Signal=SPI1_MOSI
PB0.Mode=RGB888
PB0.Signal=LTDC_R3
PB1.Mode=RGB888
PB1.Signal=LTDC_R6
PB10.Mode=Full_Duplex_Master
PB10.Signal=SPI2_SCK
PB11.Mode=RGB888
PB11.Signal=LTDC_G5
PB12.Mode=NSS_Signal_Hard
PB12.Signal=SPI2_NSS
PB15.GPIOParameters=GPIO_Label
PB15.GPIO_Label=ALLES_OK_OUTPUT
PB15.Locked=true
PB15.Signal=GPIO_Output
PB3.Mode=Trace-Asynchronous_SW
PB3.Signal=SYS_JTDO-SWO
PB6.Mode=Asynchronous
PB6.Signal=USART1_TX
PB7.Mode=I2C
PB7.Signal=I2C1_SDA
PB8.Mode=I2C
PB8.Signal=I2C1_SCL
PB9.Mode=RGB888
PB9.Signal=LTDC_B7
PC0.Signal=FMC_SDNWE
PC10.Mode=Full_Duplex_Master
PC10.Signal=SPI3_SCK
PC11.Mode=Full_Duplex_Master
PC11.Signal=SPI3_MISO
PC12.Mode=Full_Duplex_Master
PC12.Signal=SPI3_MOSI
PC14/OSC32_IN.Mode=LSE-External-Oscillator
PC14/OSC32_IN.Signal=RCC_OSC32_IN
PC15/OSC32_OUT.Mode=LSE-External-Oscillator
PC15/OSC32_OUT.Signal=RCC_OSC32_OUT
PC2.Mode=SdramChipSelect1_2
PC2.Signal=FMC_SDNE0
PC3.Mode=SdramChipSelect1_2
PC3.Signal=FMC_SDCKE0
PC7.Mode=RGB888
PC7.Signal=LTDC_G6
PCC.Checker=false
PCC.Family=STM32F4
PCC.MCU=STM32F429I(E-G-I)Tx
PCC.MXVersion=4.7.1
PCC.PartNumber=STM32F429IITx
PCC.Seq0=0
PCC.SubFamily=STM32F429/439
PCC.Temperature=25
PCC.Vdd=1.8
PD0.Signal=FMC_D2_DA2
PD1.Signal=FMC_D3_DA3
PD10.Signal=FMC_D15_DA15
PD14.Signal=FMC_D0_DA0
PD15.Signal=FMC_D1_DA1
PD3.Mode=RGB888
PD3.Signal=LTDC_G7
PD6.Mode=RGB888
PD6.Signal=LTDC_B2
PD8.Signal=FMC_D13_DA13
PD9.Signal=FMC_D14_DA14
PE0.Signal=FMC_NBL0
PE1.Signal=FMC_NBL1
PE10.Signal=FMC_D7_DA7
PE11.Signal=FMC_D8_DA8
PE12.Signal=FMC_D9_DA9
PE13.Signal=FMC_D10_DA10
PE14.Signal=FMC_D11_DA11
PE15.Signal=FMC_D12_DA12
PE4.Mode=RGB888
PE4.Signal=LTDC_B0
PE5.Mode=RGB888
PE5.Signal=LTDC_G0
PE6.Mode=RGB888
PE6.Signal=LTDC_G1
PE7.Signal=FMC_D4_DA4
PE8.Signal=FMC_D5_DA5
PE9.Signal=FMC_D6_DA6
PF0.Signal=FMC_A0
PF1.Signal=FMC_A1
PF10.Mode=RGB888
PF10.Signal=LTDC_DE
PF11.Signal=FMC_SDNRAS
PF12.Signal=FMC_A6
PF13.Signal=FMC_A7
PF14.Signal=FMC_A8
PF15.Signal=FMC_A9
PF2.Signal=FMC_A2
PF3.Signal=FMC_A3
PF4.Signal=FMC_A4
PF5.Signal=FMC_A5
PF6.Mode=NSS_Signal_Hard
PF6.Signal=SPI5_NSS
PF7.Mode=Full_Duplex_Master
PF7.Signal=SPI5_SCK
PF8.Mode=Full_Duplex_Master
PF8.Signal=SPI5_MISO
PF9.Mode=Full_Duplex_Master
PF9.Signal=SPI5_MOSI
PG0.Signal=FMC_A10
PG1.Signal=FMC_A11
PG11.Mode=RGB888
PG11.Signal=LTDC_B3
PG12.Mode=RGB888
PG12.Signal=LTDC_B1
PG15.Signal=FMC_SDNCAS
PG4.Signal=FMC_A14_BA0
PG5.Signal=FMC_A15_BA1
PG6.Mode=RGB888
PG6.Signal=LTDC_R7
PG7.Mode=RGB888
PG7.Signal=LTDC_CLK
PG8.Signal=FMC_SDCLK
PH0/OSC_IN.Mode=HSE-External-Oscillator
PH0/OSC_IN.Signal=RCC_OSC_IN
PH1/OSC_OUT.Mode=HSE-External-Oscillator
PH1/OSC_OUT.Signal=RCC_OSC_OUT
PH10.Mode=RGB888
PH10.Signal=LTDC_R4
PH11.Mode=RGB888
PH11.Signal=LTDC_R5
PH13.Mode=RGB888
PH13.Signal=LTDC_G2
PH14.Mode=RGB888
PH14.Signal=LTDC_G3
PH15.Mode=RGB888
PH15.Signal=LTDC_G4
PH2.Mode=RGB888
PH2.Signal=LTDC_R0
PH3.Mode=RGB888
PH3.Signal=LTDC_R1
PH8.Mode=RGB888
PH8.Signal=LTDC_R2
PI10.Mode=RGB888
PI10.Signal=LTDC_HSYNC
PI2.Mode=Full_Duplex_Master
PI2.Signal=SPI2_MISO
PI3.Mode=Full_Duplex_Master
PI3.Signal=SPI2_MOSI
PI4.Mode=RGB888
PI4.Signal=LTDC_B4
PI6.Mode=RGB888
PI6.Signal=LTDC_B6
PI9.Mode=RGB888
PI9.Signal=LTDC_VSYNC
ProjectManager.AskForMigrate=true
ProjectManager.BackupPrevious=false
ProjectManager.CompilerOptimize=2
ProjectManager.ComputerToolchain=false
ProjectManager.CoupleFile=false
ProjectManager.DeletePrevious=false
ProjectManager.DeviceId=STM32F429IITx
ProjectManager.FirmwarePackage=STM32Cube FW_F4 V1.5.0
ProjectManager.FreePins=true
ProjectManager.HalAssertFull=false
ProjectManager.KeepUserCode=false
ProjectManager.LastFirmware=true
ProjectManager.LibraryCopy=0
ProjectManager.ProjectBuild=false
ProjectManager.ProjectFileName=OSTC4.ioc
ProjectManager.ProjectName=OSTC4
ProjectManager.TargetToolchain=MDK-ARM 4.73
ProjectManager.ToolChainLocation=
RCC.48MHZClocksFreq_Value=48000000
RCC.AHBFreq_Value=168000000
RCC.APB1CLKDivider=RCC_HCLK_DIV4
RCC.APB1Freq_Value=42000000
RCC.APB1TimFreq_Value=84000000
RCC.APB2CLKDivider=RCC_HCLK_DIV2
RCC.APB2Freq_Value=84000000
RCC.APB2TimFreq_Value=168000000
RCC.CortexFreq_Value=21000000
RCC.EthernetFreq_Value=168000000
RCC.FCLKCortexFreq_Value=168000000
RCC.FamilyName=M
RCC.HCLKFreq_Value=168000000
RCC.HSE_VALUE=8000000
RCC.HSI_VALUE=16000000
RCC.I2SClocksFreq_Value=153600000
RCC.IPParameters=PLLSource,LSI_VALUE,APB1TimFreq_Value,VcooutputI2SQ,SAI_AClocksFreq_Value,APB2Freq_Value,MCO2PinFreq_Value,APB1CLKDivider,PLLSourceVirtualString,FCLKCortexFreq_Value,RCC_RTC_Clock_SourceVirtual,48MHZClocksFreq_Value,AHBFreq_Value,VCOInputFreq_Value,PLLSourceVirtual,I2SClocksFreq_Value,VCOSAIOutputFreq_Value,SYSCLKFreq_VALUE,PLLQ,SYSCLKSource,LSE_VALUE,HSE_VALUE,HSI_VALUE,LCDTFTFreq_Value,VCOSAIOutputFreq_ValueQ,VCOI2SOutputFreq_Value,VCOSAIOutputFreq_ValueR,PLLCLKFreq_Value,PLLSAIN,RTCFreq_Value,VDD_VALUE,FamilyName,HCLKFreq_Value,EthernetFreq_Value,APB2CLKDivider,PLLM,PLLN,VCOOutputFreq_Value,SAI_BClocksFreq_Value,VcooutputI2S,CortexFreq_Value,APB1Freq_Value,RCC_RTC_Clock_Source_FROM_HSE,RTCHSEDivFreq_Value,APB2TimFreq_Value
RCC.LCDTFTFreq_Value=30800000
RCC.LSE_VALUE=32768
RCC.LSI_VALUE=32000
RCC.MCO2PinFreq_Value=168000000
RCC.PLLCLKFreq_Value=168000000
RCC.PLLM=5
RCC.PLLN=210
RCC.PLLQ=7
RCC.PLLSAIN=77
RCC.PLLSource=RCC_PLLSOURCE_HSE
RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSE
RCC.PLLSourceVirtualString=RCC_PLLSOURCE_HSE
RCC.RCC_RTC_Clock_SourceVirtual=RCC_RTCCLKSOURCE_LSE
RCC.RCC_RTC_Clock_Source_FROM_HSE=RCC_RTCCLKSOURCE_HSE_DIV25
RCC.RTCFreq_Value=32768
RCC.RTCHSEDivFreq_Value=320000
RCC.SAI_AClocksFreq_Value=30800000
RCC.SAI_BClocksFreq_Value=30800000
RCC.SYSCLKFreq_VALUE=168000000
RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK
RCC.VCOI2SOutputFreq_Value=307200000
RCC.VCOInputFreq_Value=1600000
RCC.VCOOutputFreq_Value=336000000
RCC.VCOSAIOutputFreq_Value=123200000
RCC.VCOSAIOutputFreq_ValueQ=30800000
RCC.VCOSAIOutputFreq_ValueR=61600000
RCC.VDD_VALUE=1.8
RCC.VcooutputI2S=153600000
RCC.VcooutputI2SQ=153600000
SH.FMC_A0.0=FMC_A0,12b-sda2
SH.FMC_A0.ConfNb=1
SH.FMC_A1.0=FMC_A1,12b-sda2
SH.FMC_A1.ConfNb=1
SH.FMC_A10.0=FMC_A10,12b-sda2
SH.FMC_A10.ConfNb=1
SH.FMC_A11.0=FMC_A11,12b-sda2
SH.FMC_A11.ConfNb=1
SH.FMC_A14_BA0.0=FMC_BA0,FourSdramBanks2
SH.FMC_A14_BA0.ConfNb=1
SH.FMC_A15_BA1.0=FMC_BA1,FourSdramBanks2
SH.FMC_A15_BA1.ConfNb=1
SH.FMC_A2.0=FMC_A2,12b-sda2
SH.FMC_A2.ConfNb=1
SH.FMC_A3.0=FMC_A3,12b-sda2
SH.FMC_A3.ConfNb=1
SH.FMC_A4.0=FMC_A4,12b-sda2
SH.FMC_A4.ConfNb=1
SH.FMC_A5.0=FMC_A5,12b-sda2
SH.FMC_A5.ConfNb=1
SH.FMC_A6.0=FMC_A6,12b-sda2
SH.FMC_A6.ConfNb=1
SH.FMC_A7.0=FMC_A7,12b-sda2
SH.FMC_A7.ConfNb=1
SH.FMC_A8.0=FMC_A8,12b-sda2
SH.FMC_A8.ConfNb=1
SH.FMC_A9.0=FMC_A9,12b-sda2
SH.FMC_A9.ConfNb=1
SH.FMC_D0_DA0.0=FMC_D0,sd-16b-d2
SH.FMC_D0_DA0.ConfNb=1
SH.FMC_D10_DA10.0=FMC_D10,sd-16b-d2
SH.FMC_D10_DA10.ConfNb=1
SH.FMC_D11_DA11.0=FMC_D11,sd-16b-d2
SH.FMC_D11_DA11.ConfNb=1
SH.FMC_D12_DA12.0=FMC_D12,sd-16b-d2
SH.FMC_D12_DA12.ConfNb=1
SH.FMC_D13_DA13.0=FMC_D13,sd-16b-d2
SH.FMC_D13_DA13.ConfNb=1
SH.FMC_D14_DA14.0=FMC_D14,sd-16b-d2
SH.FMC_D14_DA14.ConfNb=1
SH.FMC_D15_DA15.0=FMC_D15,sd-16b-d2
SH.FMC_D15_DA15.ConfNb=1
SH.FMC_D1_DA1.0=FMC_D1,sd-16b-d2
SH.FMC_D1_DA1.ConfNb=1
SH.FMC_D2_DA2.0=FMC_D2,sd-16b-d2
SH.FMC_D2_DA2.ConfNb=1
SH.FMC_D3_DA3.0=FMC_D3,sd-16b-d2
SH.FMC_D3_DA3.ConfNb=1
SH.FMC_D4_DA4.0=FMC_D4,sd-16b-d2
SH.FMC_D4_DA4.ConfNb=1
SH.FMC_D5_DA5.0=FMC_D5,sd-16b-d2
SH.FMC_D5_DA5.ConfNb=1
SH.FMC_D6_DA6.0=FMC_D6,sd-16b-d2
SH.FMC_D6_DA6.ConfNb=1
SH.FMC_D7_DA7.0=FMC_D7,sd-16b-d2
SH.FMC_D7_DA7.ConfNb=1
SH.FMC_D8_DA8.0=FMC_D8,sd-16b-d2
SH.FMC_D8_DA8.ConfNb=1
SH.FMC_D9_DA9.0=FMC_D9,sd-16b-d2
SH.FMC_D9_DA9.ConfNb=1
SH.FMC_NBL0.0=FMC_NBL0,Sd2ByteEnable2
SH.FMC_NBL0.ConfNb=1
SH.FMC_NBL1.0=FMC_NBL1,Sd2ByteEnable2
SH.FMC_NBL1.ConfNb=1
SH.FMC_SDCLK.0=FMC_SDCLK,12b-sda2
SH.FMC_SDCLK.ConfNb=1
SH.FMC_SDNCAS.0=FMC_SDNCAS,12b-sda2
SH.FMC_SDNCAS.ConfNb=1
SH.FMC_SDNRAS.0=FMC_SDNRAS,12b-sda2
SH.FMC_SDNRAS.ConfNb=1
SH.FMC_SDNWE.0=FMC_SDNWE,12b-sda2
SH.FMC_SDNWE.ConfNb=1
SPI1.CalculateBaudRate=42.0 MBits/s
SPI1.IPParameters=VirtualNSS,Mode,CalculateBaudRate
SPI1.Mode=SPI_MODE_MASTER
SPI1.VirtualNSS=VM_NSSHARD
SPI2.CalculateBaudRate=21.0 MBits/s
SPI2.IPParameters=VirtualNSS,Mode,CalculateBaudRate
SPI2.Mode=SPI_MODE_MASTER
SPI2.VirtualNSS=VM_NSSHARD
SPI3.CalculateBaudRate=21.0 MBits/s
SPI3.IPParameters=VirtualNSS,Mode,CalculateBaudRate
SPI3.Mode=SPI_MODE_MASTER
SPI3.VirtualNSS=VM_NSSHARD
SPI5.CalculateBaudRate=42.0 MBits/s
SPI5.IPParameters=VirtualNSS,Mode,CalculateBaudRate
SPI5.Mode=SPI_MODE_MASTER
SPI5.VirtualNSS=VM_NSSHARD
VP_DMA2D_VS_DMA2D.Mode=DMA2D_Activate
VP_DMA2D_VS_DMA2D.Signal=DMA2D_VS_DMA2D
VP_RTC_VS_RTC_Alarm_A_Intern.Mode=Alarm A
VP_RTC_VS_RTC_Alarm_A_Intern.Signal=RTC_VS_RTC_Alarm_A_Intern