cancel
Showing results for 
Search instead for 
Did you mean: 

NetXDuo issues after power loss

olaan
Associate II

Hello,

I have encountered a peculiar problem and I am running out of ideas on what to do next.

I'm working on a project with an stm32H563 mcu and lan8742 phy, using threadX and netXduo.

When the code is first downloaded it runs fine, but after a power cycle it doesn't. Connecting a debugger shows that everything is running as expected except there are no ip_events generated. The condition 

if (ip_events & NX_IP_RECEIVE_EVENT)

 in "nx_ip_thread_entry.c" stops triggering (ip_events never changes.)

The thing is, a few weeks ago everything was working fine, the application started up and ran as expected, it responded to pings and processed incoming UDP - it is still running on two of the boards I prepared back then (and I dare not touch those at the moment).

Now that I do the same thing with any of the other boards, all of which were working previously, the application boots and runs after programming, but if I cut the power and restart, it doesn't. It's the same code checked out from the same repo, compiled on the same computer. I've also tried other computers, both Windows and Mac OS, so it's probably not that. The only thing I know has changed are updates to CubeMX and CubeIDE, but I haven't seen any reports on recent breaking changes.

Any help or suggestions on where to dig would be greatly appreciated.

Cheers,

// Ola

14 REPLIES 14
STea
ST Employee

Hello @olaan ,

can give us more information about the version of cubeMX/IDE that were working and the newer versions you are working with also I recommend checking the changes that need to be made in the linker files to properly allocate the memories. Check also the pin assignment for Ethernet and if it is according to the board schematics. it will be helpful if you can share about your code and how did you implement the configurations of the Ethernet and ThreadX AND NETX.

BR

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
olaan
Associate II

Hello @STea and thanks for the reply!

 

 
The last confirmed working firmware was built on March 12. I always update to the latest available version of CubeMX and CubeIDE, so I think it was 6.11 and 1.14, respectively, though that could be wrong - I couldn't find a release date for CubeMX.

I went over the pin assignment as you suggested, and it's the same in the project as on the PCB schematics.

Could you point me to what changes need to be made in the linker files? I've based the project on the Nx_UDP_Echo_Server example for the STM32H563ZIT board and I haven't touched the linker file at all.

I've attached two screenshots from the ThreadX and NetX configurations. What else could be helpful to see?

Cheers,

// Ola




olaan
Associate II

So, a quick update.

 

I installed CubeIDE 1.14 (with CubeMX 6.10) ported the project and now it works as expected. Presumably there is some change introduced in 1.15 / 6.10 that breaks my project, though I'm not sure what it could be.

Cheers,

// Ola

olaan
Associate II

Spot on. This is my problem exactly. I was pretty sure it was reproducible since I got it consistently on windows and Mac, but you've confirmed it.

Cheers,

// Ola

STea
ST Employee

Hello @olaan ,

I confirm the issue, I reported the issue internally.

Internal ticket number: 179408. (This is an internal tracking number and is not accessible or usable by customers).

Thank you.

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
olaan
Associate II

Thank you!

Any ETA on when it will be fixed? I'd rather not update without knowing if my application will work.

Cheers,

// Ola

Hello @olaan ,

after further investigation we are unfortunately unable to reproduce your behavior.

if you can share the project to further examen what's happening it would be great.
Juste as a hint, when you opened your project with CubeIDE 1.15 did you perform an STLINK update to your board and if you did, did you change the clock speed because in this update we use clock speed 8.33Mhz and not the older 8Mhz value.
BR 

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
olaan
Associate II

Hello,

I did all the updates I could find at the time, so the ST-Link should also have been updated.

I have a project which demonstrates the problem. However, when we talked last time, it did not seem like the forum allowed me to upload it. Is there another way I could share it with you?

It is a bit strange that it could not be reproduced on your side. We could consistently recreate the issue by simply creating new projects and including the NetXDuo driver. Are there more recent versions available where it may have been fixed as part of some other issue? I hesitate to update without a reasonable chance it has been fixed.

 

Cheers,

// Ola