2014-02-25 06:30 AM
Hi guys,
I need help to configure the stm32f4 clock to disable the pll and just work with the 8MHz external crystal of the discovery board. The goal is to reduce as much as possible the consumption of the microcontroller and see which would be the best crystal/consumption relation to use in my project. I generated a system_stm32f4xx with theCopia de STM32F4xx_Clock_Configuration_V1.1.0 but there wasn´t any difference in the consumption. This is the result of the generated file:* 5. This file configures the system clock as follows:
*=============================================================================
*=============================================================================
* Supported STM32F40xx/41xx/427x/437x devices
*-----------------------------------------------------------------------------
* System Clock source | HSE
*-----------------------------------------------------------------------------
* SYSCLK(Hz) | 8000000
*-----------------------------------------------------------------------------
* HCLK(Hz) | 8000000
*-----------------------------------------------------------------------------
* AHB Prescaler | 1
*-----------------------------------------------------------------------------
* APB1 Prescaler | 1
*-----------------------------------------------------------------------------
* APB2 Prescaler | 1
*-----------------------------------------------------------------------------
* HSE Frequency(Hz) | 8000000
*-----------------------------------------------------------------------------
* PLL_M | 9
*-----------------------------------------------------------------------------
* PLL_N | 192
*-----------------------------------------------------------------------------
* PLL_P | 6
*-----------------------------------------------------------------------------
* PLL_Q | 4
*-----------------------------------------------------------------------------
* PLLI2S_N | NA
*-----------------------------------------------------------------------------
* PLLI2S_R | NA
*-----------------------------------------------------------------------------
* I2S input clock | NA
*-----------------------------------------------------------------------------
* VDD(V) | 3.3
*-----------------------------------------------------------------------------
* Main regulator output voltage | Scale2 mode
*-----------------------------------------------------------------------------
* Flash Latency(WS) | 0
*-----------------------------------------------------------------------------
* Prefetch Buffer | OFF
*-----------------------------------------------------------------------------
* Instruction cache | ON
*-----------------------------------------------------------------------------
* Data cache | ON
*-----------------------------------------------------------------------------
* Require 48MHz for USB OTG FS, | Disabled
* SDIO and RNG clock |
*-----------------------------------------------------------------------------
Any peace of advice will be appreciated.
Best regards,
Bruno
#stm32 #wait-for-you--clive1-!-!-! #discovery #stm32f4
2014-02-25 06:36 AM
Are you able to separate the STM32F4 from the surrounding circuitry?
You could modify SystemInit() to turn on the HSE, and switch to it. If SystemInit() did nothing (empty body) then the part would be running from the 16 MHz HSI.2014-02-25 06:50 AM
2014-02-25 07:04 AM
You should be able to measure current at JP1 (Idd). What amount of current are we talking about, and what kind of equipment are you monitoring it with?
Having the Cortex-M4 idle in a WFI loop should get it too a relatively low level, beyond that you'd need to investigate STOP/STANDBY. Internal clocks can be confirmed using the MCOx output with suitable routing selected.2014-02-25 08:24 AM
We measured the input current of the entire system, which was about 120mA with a fluke tester. I am going to measure in jp1 as you said to be more specific.
Thank you very much!Bruno