Skip to main content
st140728
Associate
November 17, 2015
Question

STM32Cube V1.9.0 F429 Demo bug

  • November 17, 2015
  • 2 replies
  • 599 views
Posted on November 17, 2015 at 21:42

Hi

In the  STM32F429I-Discovery Demo 

STM32Cube\Repository\STM32Cube_FW_F4_V1.9.0\Projects\STM32F429I-Discovery\Demonstrations

This demo worked the first couple of times, but then I've had this demo randomly fail when I started to work with it.

I tracked it to something happening when   main.c:k_LogInit();   was called.

After calling enough times, it randomly starts working

seems like EDIT in the example /EDIT 

 k_LogInit() is called before k_MemInit() - but it relies on the memory pool to be initialized to 0's which it maybe on powerup.

The correct sequence that is working for me is

  /* Initialize Joystick, Touch screen and LEDs */

  k_BspInit();

  /*Initialize memory pools */

  k_MemInit();

  k_LogInit();    

  /* Initialize RTC */

  k_CalendarBkupInit();  

#f429-discovery
    This topic has been closed for replies.

    2 replies

    Nickname5522_O
    Visitor II
    November 19, 2015
    Posted on November 19, 2015 at 14:28

    Hi neilh,

    ''but then I've had this demo randomly fail when I started to work with it.''

     

    What do you mean by the fail? Which module does not work? Could you explain more?

    -Shahrzad-

    st140728
    st140728Author
    Associate
    November 20, 2015
    Posted on November 20, 2015 at 21:24

    It dies. Kaput.With ST-Link I step into it and it never returns. On halting is in an undefined exception vector.

    Requires a powered reset to start working.

    k_LogInit() relies on memory being initialized to 0 - which it is I think is cold power (depending on ram cold initialization), so let the power die and then repower.

    k_MemInit sets all the buffers to 0, and needs to be done before k_LogInit()

    Check the code out - I believe it is clear when looking at the code. It hasn't happened since I made the modifications. I use board reset to get the control back to the begining of main