cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX 4.12.0 broken LwIP

nikola1010
Associate II
Posted on December 15, 2015 at 18:08

It seems that in version 4.12.0 LwIP is broken.

Code that worked with previous version was running without problems.

Migration made code stop working.

Tested on Stm32f407 discovery + expansion board (LAN8720).
10 REPLIES 10
Bino
Senior
Posted on December 17, 2015 at 09:24

Hello,

I did some tests to check LwIP using4.12 as well as 4.11 version of STM32CubeMX and I did not see obvious issue in LwIP using a configuration based onSTM32f407 discovery board (after moving signals affected on ETH to allow ETH+LwIP activation), I used version 1.0 of the STM32F4 FW package. I attached the ioc file so that you can check this minimal example is compiling.

Otherwise, I can propose that you either provide your ioc. file and/or also precise the version of theSTM32F4 FW package you are using (mentioned in Project Settings), and the exact problem you are dealing with so that we can more investigate.

Thanks for your understanding.

/Eric.a

________________

Attachments :

lwip.ioc : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Htid&d=%2Fa%2F0X0000000aW7%2F_EW5LzORjeBJadq4zpt1WHcE3LOrCTJuWlGcVfgMFKQ&asPdf=false
nikola1010
Associate II
Posted on December 19, 2015 at 19:29

Hi big thanks for helping out, I really support CubeMX initiative but problems like this are becoming real obstacles without some help, I really appreciate help.

I am working with stm32f407 discovery board with expansion board.

I have put whole project into zip file so you can reproduce problem.

After loading firmware, interrupt for RX never gets called.

http://www.pastefile.com/aHBB29

Bino
Senior
Posted on December 21, 2015 at 11:51

Hello,

Thanks for providing the requested information.

I checked your project within a 4.11 and 4.12 STM32CubeMX releases:

- the code generated in Src and Inc folder is identical except one change in HSE_STARTUP_TIMEOUT value in stm32f4xx_hal_conf.h file

- the code related to freertos and lwip is 100% identical

- the middleware code in Middlewares folder is 100% identical

The differences found are in F4 FW package (between FW_F4 1.9.0 and FW_F4 1.10).

If you could try to use with 1.12 release the FW_F4 1.9.0 by replacing in your project the contents of Drivers and Inc folders to check if your project is working ?

Thanks for your reply.

nikola1010
Associate II
Posted on December 21, 2015 at 15:12

Hi,

big thank you for helping out.

No problem, I would gladly do all the steps.

Could you please tell me where to get specific versions and how to put them to work.

I don't have additional parts of the project, all that I am trying to use is already included so there are not additional problems that could be introduced.

nikola1010
Associate II
Posted on December 21, 2015 at 15:45

One more thing, do you mean 4.12 or  1.12 release.

What is 1.12? My CubeMX is 4.12.0 and STM32Cube V1.0.

Bino
Senior
Posted on December 21, 2015 at 16:01

Hello again,

Sorry for the typo ''1.12'' stands in fact for CubeMX ''4.0''...

Please find attached a zip with Drivers andstm32f4xx_hal_conf.h from F4 FW pack v1.9.0

You just have to update your project done using4.0 ofCubeMX after having generated code (otherwise update will be overwritten byF4 FWv1.0 files...) with zip contents attached.

Then if it works using v1.9.0 files, the problem is coming from this new versionv1.0.

Otherwise, I would need to get the version of your project working with CubeMX4.0 if you still have it!

Thanks for your reply.

________________

Attachments :

fw-f4-1.9.0.7z : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Htii&d=%2Fa%2F0X0000000aW8%2FB._1Lf.bQXjurlSNOQAWnmjvwZGQr_5Uyd3ZSBYG0cA&asPdf=false
nikola1010
Associate II
Posted on December 21, 2015 at 18:49

It seems that problems isolates to: HAL_Delay(PHY_RESET_DELAY); // stm32f4xx_hal_eth.c file

After putting (''HAL_IncTick()'' ) change below it seems it works.

Why this call is missing?

/******************************************************************************/

/*            Cortex-M4 Processor Interruption and Exception Handlers         */

/******************************************************************************/

/**

* @brief This function handles System tick timer.

*/

void SysTick_Handler(void)

{

  /* USER CODE BEGIN SysTick_IRQn 0 */

  /* USER CODE END SysTick_IRQn 0 */

  osSystickHandler();

  /* USER CODE BEGIN SysTick_IRQn 1 */

  HAL_IncTick();

  /* USER CODE END SysTick_IRQn 1 */

}

Bino
Senior
Posted on December 22, 2015 at 15:31

Hello,

The problem you raised is now well is identified and a solution is under investigation.

Potentially 4.13 release could solve it.

Thanks for your fruitful feedback.

Best Regards.

Eric.a

nikola1010
Associate II
Posted on December 25, 2015 at 18:11

Hi,

excellent news! Thank you for going extra mile in helping out.

I know that there are still many problems with CubeMX but I beleive that just working them out like this will make one day CubeMX perfect tool for all of us. Keep up the good work!