Skip to content

Commit

Permalink
Update clock config for 8Mhz HSE matching PT1 internal clocks
Browse files Browse the repository at this point in the history
  • Loading branch information
kekiefer committed Feb 22, 2018
1 parent 22de725 commit 4fc6515
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 37 deletions.
4 changes: 2 additions & 2 deletions Inc/stm32f4xx_hal_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
******************************************************************************
* @attention
*
* <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
* <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -104,7 +104,7 @@
* (when HSE is used as system clock source, directly or through the PLL).
*/
#if !defined (HSE_VALUE)
#define HSE_VALUE ((uint32_t)14318182U) /*!< Value of the External oscillator in Hz */
#define HSE_VALUE ((uint32_t)8000000U) /*!< Value of the External oscillator in Hz */
#endif /* HSE_VALUE */

#if !defined (HSE_STARTUP_TIMEOUT)
Expand Down
10 changes: 5 additions & 5 deletions Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Description : Main program body
******************************************************************************
*
* COPYRIGHT(c) 2016 STMicroelectronics
* COPYRIGHT(c) 2017 STMicroelectronics
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -224,10 +224,10 @@ void SystemClock_Config(void)
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
RCC_OscInitStruct.PLL.PLLM = 11;
RCC_OscInitStruct.PLL.PLLN = 295;
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV4;
RCC_OscInitStruct.PLL.PLLQ = 8;
RCC_OscInitStruct.PLL.PLLM = 4;
RCC_OscInitStruct.PLL.PLLN = 96;
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
RCC_OscInitStruct.PLL.PLLQ = 4;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
Error_Handler();
Expand Down
58 changes: 28 additions & 30 deletions devboard.ioc
Original file line number Diff line number Diff line change
Expand Up @@ -279,44 +279,42 @@ ProjectManager.ProjectFileName=devboard.ioc
ProjectManager.ProjectName=devboard
ProjectManager.StackSize=0x400
ProjectManager.TargetToolchain=SW4STM32
ProjectManager.ToolChainLocation=/Code/GroupGets/lepton/purethermal1-firmware/
ProjectManager.ToolChainLocation=/Code/GroupGets/lepton/purethermal1-firmware
ProjectManager.UnderRoot=true
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false,2-MX_DMA_Init-DMA-false,3-MX_CRC_Init-CRC-false,4-MX_I2C1_Init-I2C1-false,5-MX_SPI2_Init-SPI2-false,6-MX_TIM2_Init-TIM2-false,7-MX_TIM3_Init-TIM3-false,8-MX_TIM4_Init-TIM4-false,9-MX_USART2_UART_Init-USART2-false,10-MX_USB_DEVICE_Init-USB_DEVICE-false
RCC.48MHZClocksFreq_Value=47998451.02272727
RCC.AHBFreq_Value=95996902.04545455
RCC.APB1CLKDivider=RCC_HCLK_DIV4
RCC.APB1Freq_Value=23999225.511363637
RCC.APB1TimFreq_Value=47998451.02272727
RCC.APB2Freq_Value=95996902.04545455
RCC.APB2TimFreq_Value=95996902.04545455
RCC.CortexFreq_Value=95996902.04545455
RCC.48MHZClocksFreq_Value=48000000
RCC.AHBFreq_Value=96000000
RCC.APB1CLKDivider=RCC_HCLK_DIV2
RCC.APB1Freq_Value=48000000
RCC.APB1TimFreq_Value=96000000
RCC.APB2Freq_Value=96000000
RCC.APB2TimFreq_Value=96000000
RCC.CortexFreq_Value=96000000
RCC.EnbaleCSS=true
RCC.EthernetFreq_Value=95996902.04545455
RCC.FCLKCortexFreq_Value=95996902.04545455
RCC.EthernetFreq_Value=96000000
RCC.FCLKCortexFreq_Value=96000000
RCC.FamilyName=M
RCC.HCLKFreq_Value=95996902.04545455
RCC.HSE_VALUE=14318182
RCC.HCLKFreq_Value=96000000
RCC.HSE_VALUE=8000000
RCC.HSI_VALUE=16000000
RCC.I2SClocksFreq_Value=85909092
RCC.IPParameters=48MHZClocksFreq_Value,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,EnbaleCSS,EthernetFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI_VALUE,I2SClocksFreq_Value,LSE_VALUE,LSI_VALUE,PLLCLKFreq_Value,PLLM,PLLN,PLLP,PLLQ,PLLQCLKFreq_Value,RTCFreq_Value,RTCHSEDivFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,VCOI2SOutputFreq_Value,VCOInputFreq_Value,VCOInputMFreq_Value,VCOOutputFreq_Value,VDD_VALUE,VcooutputI2S
RCC.I2SClocksFreq_Value=48000000
RCC.IPParameters=48MHZClocksFreq_Value,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,EnbaleCSS,EthernetFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI_VALUE,I2SClocksFreq_Value,LSE_VALUE,LSI_VALUE,PLLCLKFreq_Value,PLLM,PLLN,PLLQCLKFreq_Value,RTCFreq_Value,RTCHSEDivFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,VCOI2SOutputFreq_Value,VCOInputFreq_Value,VCOInputMFreq_Value,VCOOutputFreq_Value,VDD_VALUE,VcooutputI2S
RCC.LSE_VALUE=32768
RCC.LSI_VALUE=32000
RCC.PLLCLKFreq_Value=95996902.04545455
RCC.PLLM=11
RCC.PLLN=295
RCC.PLLP=RCC_PLLP_DIV4
RCC.PLLQ=8
RCC.PLLQCLKFreq_Value=47998451.02272727
RCC.PLLCLKFreq_Value=96000000
RCC.PLLM=4
RCC.PLLN=96
RCC.PLLQCLKFreq_Value=48000000
RCC.RTCFreq_Value=32000
RCC.RTCHSEDivFreq_Value=7159091
RCC.SYSCLKFreq_VALUE=95996902.04545455
RCC.RTCHSEDivFreq_Value=4000000
RCC.SYSCLKFreq_VALUE=96000000
RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK
RCC.VCOI2SOutputFreq_Value=171818184
RCC.VCOInputFreq_Value=1301652.9090909092
RCC.VCOInputMFreq_Value=894886.375
RCC.VCOOutputFreq_Value=383987608.1818182
RCC.VCOI2SOutputFreq_Value=96000000
RCC.VCOInputFreq_Value=2000000
RCC.VCOInputMFreq_Value=500000
RCC.VCOOutputFreq_Value=192000000
RCC.VDD_VALUE=2.8
RCC.VcooutputI2S=85909092
RCC.VcooutputI2S=48000000
SH.GPXTI13.0=GPIO_EXTI13
SH.GPXTI13.ConfNb=1
SH.GPXTI5.0=GPIO_EXTI5
Expand All @@ -334,9 +332,9 @@ SH.S_TIM4_CH1.ConfNb=1
SPI2.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_2
SPI2.CLKPhase=SPI_PHASE_2EDGE
SPI2.CLKPolarity=SPI_POLARITY_HIGH
SPI2.CalculateBaudRate=11.999612 MBits/s
SPI2.CalculateBaudRate=24.0 MBits/s
SPI2.DataSize=SPI_DATASIZE_16BIT
SPI2.IPParameters=Mode,CalculateBaudRate,DataSize,CLKPolarity,CLKPhase,BaudRatePrescaler,VirtualNSS
SPI2.IPParameters=Mode,CalculateBaudRate,DataSize,CLKPolarity,CLKPhase,VirtualNSS,BaudRatePrescaler
SPI2.Mode=SPI_MODE_MASTER
SPI2.VirtualNSS=VM_NSSHARD
TIM2.Channel-Output\ Compare3\ CH3=TIM_CHANNEL_3
Expand Down

0 comments on commit 4fc6515

Please sign in to comment.