cancel
Showing results for 
Search instead for 
Did you mean: 

Problems in frequency with STM32F429NIH6

luca2399
Associate II
Posted on November 19, 2015 at 14:13

Hi,

I have problems in my project when I set the core frequancy above 100MHz. Up to 100 MHz I have no problem. When frequency is higer than 100 MHz CPU goes in hard fault. Using a frequncy of 120 MHz CPU goes in hard fault after some second or minutes, using 168MHz CPU goes in hard fault immediatly (during GPIOs configuration).

Project wase made using STM32Cube and involves a lot of peripherals (LTDC, CAN, USB, I2C, DCMI and so on). STM32F4 is powered at 3.3V.

This problem is present in two different project that share mcu power scheme and oscillators scheme.

Which can be the problem?

Someone can help me?

Thanks

#stm32f4
6 REPLIES 6
Posted on November 19, 2015 at 14:24

You're going to have to double check the settings

HSE_VALUE

PLL Settings

FLASH Wait Settings

Regulator Settings

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
luca2399
Associate II
Posted on November 19, 2015 at 14:51

Hi,

- HSE is 25MHz

- PLL is setted as Cube project:

RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;

RCC_OscInitStruct.HSEState = RCC_HSE_ON;

RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;

RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;

RCC_OscInitStruct.PLL.PLLM = 25;

RCC_OscInitStruct.PLL.PLLN = 336;

RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;

RCC_OscInitStruct.PLL.PLLQ = 7;

HAL_RCC_OscConfig(&RCC_OscInitStruct);

RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_SYSCLK|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;

 RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;

 RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;

 RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;

 RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;

- Flash latency as datasheet:

HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5);

About the Regulator Settings what info do you need?

Internal regulator should be ON (BYPASS_REG pin is connected to gnd) and PDR_ON at 3.3V.

Posted on November 19, 2015 at 15:15

In the SPL we have

    /* Select regulator voltage output Scale 1 mode */

    RCC->APB1ENR |= RCC_APB1ENR_PWREN;

    PWR->CR |= PWR_CR_VOS;

...

    /* Enable the Over-drive to extend the clock frequency to 180 Mhz */

    PWR->CR |= PWR_CR_ODEN;

    while((PWR->CSR & PWR_CSR_ODRDY) == 0)

    {

    }

    PWR->CR |= PWR_CR_ODSWEN;

    while((PWR->CSR & PWR_CSR_ODSWRDY) == 0)

    {

    }

    /* Configure Flash prefetch, Instruction cache, Data cache and wait state */

    FLASH->ACR = FLASH_ACR_PRFTEN | FLASH_ACR_ICEN |FLASH_ACR_DCEN |FLASH_ACR_LATENCY_5WS;

Not a HAL/Cube guy, you'll have to double check that yourself.

If it were my design, I'd check the internal clocks via MCO (PA8), and confirm the HSE is starting. Use HSE_BYPASS if it's coming from an XO/TCXO. Make sure your design has the proper capacitors on the VCAPx pins, and that you can see 1.25V, or so, there.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
luca2399
Associate II
Posted on November 19, 2015 at 16:45

I checked and:

- regulator voltage iis set to output Scale 1

- over-drive is disabled

- on PA8 I see a clock of 15MHz

- HSE_BYPASS is not coming from an XO/TCXO, but is grounded through a resistor like on STM32x9I-EVAL board

- VCAPx pin are OK

- On VCAPx pin i see a voltage, but is not so good. it is like a triangular waveform that oscillates from 1V to 1,6V.

 

 

Can be this the problem?

Whay is like that?

Thanks

Posted on November 19, 2015 at 19:43

I'm not familiar with the design of your board.

I thought you said you used a 25 MHz crystal? Did you switch the MCO pin to HSE/1 ? Or is the 15 MHz the result of your dividing some other internal clock?

It might oscillate if you have issues with your power supply/current, or the capacitors aren't doing their job. Check the parts placed meet the design spec.

Have you looked at an STM32F429I-DISCO board an examined the state of the signals there, and if you can run that at 168-180 MHz?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
luca2399
Associate II
Posted on November 20, 2015 at 14:54

It was wrong VCAPx capacitors!

Guy who assembled the board mounter VCAPx capacitor other than those listed.

Thank you very much.