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 Firmware v4.2.2 (update 1)


  • Please log in to reply
11 replies to this topic

#1 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 26 January 2013 - 06:23 AM

Version: 4.2.2 Update 1 (version 4.2.2.1)

This firmware requires use of the .NET Micro Framework v4.2 SDK (QFE2) and Netduino 4.2.2.0 SDK.

With this firmware, you will have the following resources available for your code:
384KB Flash
100KB+ RAM

This firmware includes the following updates:
1. Bug fix: SPI clock 'idle high' setting now supported

This firmware also includes the previous updates:
1. Netduino Plus 1 projects can be upgraded without changing HardwareProvider
2. Now compatible with legacy SecretLabs AnalogInput and PWM classes
3. Bug fix: SPI chip select timing corrected
4. Bug fix: PWM frequency corrected
5. New: more reliable rebooting during deployment
6. Static IP now works (in addition to DHCP default)
7. MAC Addresses are now loaded by TinyCLR
8. Additional I2C bug fix--pins now forced into proper configuration

To find the current version of your Netduino firmware:
1. Go to the Start Menu > Programs > Microsoft .NET Micro Framework 4.2 > Tools
2. Run MFDeploy.exe. Be careful to run MFDeploy.exe and not MFDeploy.exe.config (as file extensions are hidden by default)
3. Plug your Netduino into your PC using a Micro USB cable.
4. In the Device section at top, select USB instead of Serial. Your Netduino should appear in the drop-down; if not, select it.
5. Select the Target menu, Device Capabilities option.
6. In the output box, find the "SolutionReleaseInfo.solutionVersion" value. This is your firmware version.

To flash this firmware:
1. Detach your Netduino
2. Press and hold your Netduino's pushbutton while plugging it in via USB; this will put it in bootloader mode.
3. Erase the firmware on your Netduino using the STDFU Tester application
> a. Select the "Protocol" tab
> b. Press the "Create from Map" button
> c. Select the "Erase" radio button option
> d. Press the "Go" button
> e. Wait for erase process to complete
4. Flash the attached .DFU file using the ST DfuSe Demonstrator application (included with STDFU Tester)
> a. Locate the "Upgrade or Verify Action" pane (bottom-right pane)
> b. Press "Choose..." and select the attached DFU file
> c. Check the "Verify after download" option
> d. Press "Upgrade". It will take a few minutes to update your Netduino.
> e. Detach and reattach your Netduino (power cycle) or press "Leave DFU mode"

After flashing, to set your network settings using MFDeploy:
1. Select the Target > Configuration > Networking menu. Re-enter your IP address settings and MAC address.

Enjoy, and please let us know if you run into any troubles.

Chris

Attached Files



#2 Skwerl

Skwerl

    New Member

  • Members
  • Pip
  • 2 posts

Posted 01 February 2013 - 02:22 AM

Well, I have had a couple frustrating nights trying to get my Netduino Plus flashed to 4.2.2.  After going through SAM-Ba  stuff, I am at 4.2.1, but I cannot get either of the DFuse applications the find the Netdunio (nothing is listed in the Devices combobox).  Do I need to force the device to use one of the drivers suplied with the DFU installer?  I'm using Windows 8 Professional x64 and my Netdunio device is using the Netdunio driver version 6.1.7601.17514 (8/13/12).  Antyhing there stick out as the problem?

 

Thanks for suggestions.

Josh



#3 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 01 February 2013 - 07:19 AM

...but I cannot get either of the DFuse applications the find the Netduino (nothing is listed in the Devices combobox).

  DfuSe applications work with Netduino Plus 2 (STM32F microcontroller), not to be confused with Netduino Plus (AT91SAM7X microcontroller) that needs SAM-BA. At the time of writing 4.2.0 (Update 1) is the latest firmware for Netduino Plus.

 

Welcome to the community!



#4 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 01 February 2013 - 12:39 PM

Hey Chris, is there any other way to put the Netduino Plus 2 into bootloader mode besides holding down the button?  I'm just thinking in our "Black Box" scenario where users won't have access to the internals of Pandora's Box, is there a way either through code or the DFU Tester to have the Netduino Plus 2 boot up in bootloader mode?

 

My hope is to be able to easily upgrade the firmware on Pandora's Box without having to crack open the case.  I know piggy-backing the button and having an accesshole accessible button (like the reset on many devices) would also work.  Just trying to avoid adding yet another part.



#5 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 01 February 2013 - 04:06 PM

Hi Dave, Technically you only need to use DFUSE to flash the bootloader. You can flash the rest of the firmware (and your application) using standard Motorola HEX files and MFDeploy/MFDeployEngine. We could start posting the raw BIN/HEX files in the future if that would help. Chris

#6 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 01 February 2013 - 04:16 PM

Hi Dave, Technically you only need to use DFUSE to flash the bootloader. You can flash the rest of the firmware (and your application) using standard Motorola HEX files and MFDeploy/MFDeployEngine. We could start posting the raw BIN/HEX files in the future if that would help. Chris

 

Publishing the BIN/HEX would be great.  I guess I could also use the DFU File Manager to extract the HEX from the DFU file.  This should help.  I can then use the MFDeployEngine in my app to deploy firmware updates.



#7 iced98lx

iced98lx

    Advanced Member

  • Members
  • PipPipPip
  • 134 posts
  • LocationSouth Dakota

Posted 01 February 2013 - 09:20 PM

This upgrade went very smoothly for me vs the previous one, only had to write to the board once etc. Up and running working well!



#8 Skwerl

Skwerl

    New Member

  • Members
  • Pip
  • 2 posts

Posted 02 February 2013 - 12:09 AM

  DfuSe applications work with Netduino Plus 2 (STM32F microcontroller), not to be confused with Netduino Plus (AT91SAM7X microcontroller) that needs SAM-BA. At the time of writing 4.2.0 (Update 1) is the latest firmware for Netduino Plus.

 

Welcome to the community!

 

*Facepalm*

That "2" character is so subtle...  Color me happy but chagrinned!

 

Thank you,

Josh  



#9 AxelG

AxelG

    Advanced Member

  • Members
  • PipPipPip
  • 52 posts

Posted 02 February 2013 - 04:03 AM

Update went well, but now I am seeing a quirky problem reading from the SD card.  The following code hangs on the "while (reader.Peak())" line.  Stepping through the debugger looks like it is stuck in a loop...  Here is the code.  The file on the SD card has 10 lines of ascii data.

 

            ArrayList PortList = new ArrayList();            using (StreamReader reader = new StreamReader(PortFileName))            {                while (reader.Peek() > 0)                {                    HoldPort = new MCUPort(reader.ReadLine());                    HoldPort.State = 1;                    HoldPort.LastState = DateTime.Now;                    PortList.Add(HoldPort);                }            }


#10 Lunddahl

Lunddahl

    Advanced Member

  • Members
  • PipPipPip
  • 152 posts
  • LocationEurope, Denmark

Posted 02 February 2013 - 07:26 PM

I remember i had a lot of problems with the StreamReader.peek() method, on of them was that it would NOT return -1 at EOF.

 

http://msdn.microsof...y/hh423105.aspx

 

- Ulrik Lunddahl



#11 Tal Tikotzki

Tal Tikotzki

    Member

  • Members
  • PipPip
  • 10 posts

Posted 03 February 2013 - 01:41 AM

Update went well, but now I am seeing a quirky problem reading from the SD card.  The following code hangs on the "while (reader.Peak())" line.  Stepping through the debugger looks like it is stuck in a loop...  Here is the code.  The file on the SD card has 10 lines of ascii data.

 

            ArrayList PortList = new ArrayList();            using (StreamReader reader = new StreamReader(PortFileName))            {                while (reader.Peek() > 0)                {                    HoldPort = new MCUPort(reader.ReadLine());                    HoldPort.State = 1;                    HoldPort.LastState = DateTime.Now;                    PortList.Add(HoldPort);                }            }

 

I had a the same problems, therefore I decided to implement it differently while checking for end of stream after each read.

 

            ArrayList PortList = new ArrayList();            using (var reader = new StreamReader(PortFileName))            {                if (reader.BaseStream.Length > 0)                {                    do                    {                        HoldPort = new MCUPort(reader.ReadLine());                        HoldPort.State = 1;                        HoldPort.LastState = DateTime.Now;                        PortList.Add(HoldPort);                    } while (!reader.EndOfStream);                }                reader.Close();            } 

 

I hope that helps.

 

T



#12 AxelG

AxelG

    Advanced Member

  • Members
  • PipPipPip
  • 52 posts

Posted 03 February 2013 - 03:01 AM

Thanks to Lunddahl and T!!

 

 

i also found that EndOfStream property is not set until AFTER the first access!!!  Before that it always reads "true".  If I use Peak() after opening the stream, and then change my while loop looking at EndOfStream it seems to work.

 

I will try looking at the solution T provided.  Thanks for your help!!






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.