cancel
Showing results for 
Search instead for 
Did you mean: 

Nucleo STM32F429ZI Blinky Clock

GreenGuy
Lead
Posted on May 06, 2016 at 17:39

I have an LED Blink Hello world running using STM32CubeMX and AC6 for the Necleo-STM32F429ZI but I am unable correctly use CubeMX to configure different clock schemes.  The code uses a for loop to delay bewteen toggling the LED so different clock configs should change the blink rate.  For the first attempt I used HSI selection in the System Clock Mux.  the input clock (HSI RC) is fixed at 8MHz and the solder ball for the MRO clock from STLink chip is closed the resulting SYSCLK = 8MHz and the FCLK = 2MHz.  This all works.

When I change the clock to in the System Clock Mux to PLL with PLL source set to HSI with /M = ''/4'', *N = ''X50'', /P = ''/2'' the SYSCLK = 50MHz with FCLK = 12.5MHz.  This too works, however the blink rate has not changed.

When I attempt to speed up even more by changing the  *N value, and sometimes adjusting other values to remove errors (red highlighted clock blocks) the nucleo board hangs trying to execute the SystemClock_Config() call.

What am I missing?
3 REPLIES 3
GreenGuy
Lead
Posted on May 13, 2016 at 03:45

Found the problem but have no solution for the pre-defined board file.  If I start a MXCube design from scratch and just assign the pin the drives the LED I noticed the HSI RC box is loaded with 16 MHz and not the 8 MHz that comes with selecting the Nucleo-144 board for the 429ZI.  With 16 MHz selected (and this is something that is not user changeable) then I can set in the HCLK box the speed I want to run the system at and the software is able to find a solution.  Before with 8MHz in the HSI RC box the software was unable to find a solution and it took user guess work to find something that the software seemed happy with and in some cases when the code is compiled the system clock init call falled or the blink code only ran at one speed (my guess is 8 MHz).

The problem is in the MXCube board params to start with and the Nucleo-144 STM32F429ZI setup is broken!

I brought this up in a recent seminar for the F7 discovery board (after the session) and the presenting FAE responded ''I never use the board selections; I always start from scratch''.

In an arena where the board packages are there to accelerate development but has ended up costing me a few days tracking down a problem where the answer is ''start from scratch'', what is wrong with this picture?

GreenGuy
Lead
Posted on May 13, 2016 at 07:19

I have fixed the problem for the short term.  I found the database for the board configurations in C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\db\plugins\boardmanager\boards.  Specifically the files, C46_Discovery_STM32F429I-DISC1_STM32F429ZI_Board.ioc and C46_Discovery_STM32F429I-DISC1_STM32F429ZI_Board_AllConfig.ioc.  I made a copy of the files then opened each in Wordpad.  Toward the end of the file found the line RCC.HSI_VALUE=8000000 and changed it to RCC.HSI_VALUE=16000000.  At the top of the files it says  #MicroXplorer Configuration settings - do not modify however, after modification CubeMX is able to allow modification of the HCLK and resolve the other parameters necessary.  The generated code compiles and changes to the clock in CubeMX causes the rep rate of the LED to change as expected.  I am not sure if any other settings in ioc files need to be fixed but it would be nice if someone truly in the know would fix all the needs to be sone so the board support fully works.

GreenGuy
Lead
Posted on May 18, 2016 at 20:18

I have received a reply to the case opened regarding this issue.  STM has acknowledged the problem and the next release will have this fixed.