Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Netduino Plus 2 SerialPort.Read hangs after firmware upgrade/downgrade

hangs Serial Port

  • Please log in to reply
4 replies to this topic

#1 banalogic

banalogic

    New Member

  • Members
  • Pip
  • 7 posts

Posted 19 June 2013 - 03:40 PM

After upgrading to 4.3 our app would hang after a few minutes of action. After some troubleshoot we narrowed down to serial port read operation. We downgraded the board back down to 4.2.2.2 and the problem did not go away.

 

We created a simple test by having one netduino board to continuously send data out of an UART port, and have another netduino board to continuously read the data. Comm setting is 38400 8N1, No Handshake. We toggle some LED lights every 5000 bytes received and toggle the onboard LED light every loop 1000 iterations so we can see the status of the operations.

 

We tested the code on 2 "virgin" boards where no firmware changes were done - one Netduino 2 and one Netduino plus 2, and both boards ran overnight without a problem. However on a board we have done firmware changes, the board would just freeze after a few minutes of operation. We confirmed the behavior is the same on 4.2.1.1, 4.2.2.2 and 4.3.0.0 Beta.

 

We wrote 2 programs - One program does a simple serialPort.Read operation in the main loop (code as attached). We also tried using DataReceived event handler. Both approach makes no difference - the program would hang between 5 and 15 minutes.

 

We followed instructions on http://forums.netdui...-v422-update-2/. The only thing we did not do is resetting the Mac Address, as MFDeploy gave error message "Unable to erase configuration sector memory"

 

Anybody had the same experience and can shed some lights on this? We now have 3 Netduino plus 2 boards that are half bricked.

 

 

 

Attached Files



#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 19 June 2013 - 09:47 PM

Hi banalogic, Before you reflash your board, are you using STDFU Tester to completely erase the current firmware? Upgrading a board shouldn't change anything that could affect this, especially if you downgrade it afterwards. Finally--are there any other differences between the boards? Does this happen if your network connection is disconnected, etc.? Chris

#3 banalogic

banalogic

    New Member

  • Members
  • Pip
  • 7 posts

Posted 20 June 2013 - 03:06 PM

Yes we did use STDFU to completely erase the firmware

 

The boards are not connected to the network.

 

MFDeploy Device capabilities check for the working boards and non-working boards are identical.

 

Other than the MAC address, the boards are the same. I can't verify if the non-working boards were defective to begin with though. Those were the 1st two boards (Plus 2) we bought and we upgraded to 4.3 right after we got them. After we experienced the hang up issues we downgraded them back but that didn't resolve the problem. Then we bought another Plus 2 and a 2 to try and they work fine, on exactly the same code with exactly the same way we deploy to the board.

 



#4 banalogic

banalogic

    New Member

  • Members
  • Pip
  • 7 posts

Posted 26 June 2013 - 05:29 PM

Upon further testing I found out the problem persists running from a "virgin" Plus 2 with 4.2.2.2 pre-installed. It just happened to take longer to freeze.

 

We have discovered however the same code running on the Netduino 2 has not yet hung after 24 hours and counting.

 

Both boards are running V4.2.2.2. Anybody knows the difference between two boards in design, other than the difference in the processor?

 

I looked at the datasheet for both [color=rgb(0,0,0);font-family:Tahoma;font-size:small;]STM32F2 and [/color][color=rgb(0,0,0);font-family:Tahoma;font-size:small;]STM32F4 and they look almost identical except the faster speed and the Ethernet interface on the F4.[/color]

 

[color=rgb(0,0,0);font-family:Tahoma;font-size:small;]Can someone recommend other utilities and methods to further troubleshoot the problem?[/color]



#5 banalogic

banalogic

    New Member

  • Members
  • Pip
  • 7 posts

Posted 26 June 2013 - 11:17 PM

I've attached the revised code to demonstrate how to recreate the problem. Exception handling code is added to confirm no exception was raised.

 

The same code is still running under the Netduino 2 board as I am posting.

 

Please help review the code and see if it is something I did wrong or if it is the hardware/firmware.

 

Attached Files






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.