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 Mini Firmware v4.1.1 ALPHA 3


  • Please log in to reply
23 replies to this topic

#1 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 25 November 2010 - 05:11 AM

[replaced by newer firmware]

#2 Quiche31

Quiche31

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts
  • LocationFrance

Posted 26 November 2010 - 09:56 PM

WARNING: This firmware is pre-release firmware. It may temporarily cause your Netduino Mini to cease functioning properly. If this firmware does not work for you, you will likely need to erase your Netduino Mini completely and re-flash the production v4.1.0.5 bootloader using Atmel SAM-BA tools (on a 32-bit Windows installation) and the production v4.1.0.5 firmware using MFDeploy. Reflashing a Netduino Mini after a full erase requires an RS232 connection to your Netduino Mini.


[ Moderator edit: this issue has been solved. Details are archived in following below. If you want to completely erase and reflash your Netduino, use of SAM-BA 2.09 is recommended. ]

Hi Chris. This is exactly what happened to me. My Mini was working just fine with firmware 4.1.0.5, and I probably should have sticked with it! But I was too excited by the SD support and thought I would flash this Alpha version. But I picked the wrong version I guess and now am stuck.

My deployment port was TTL (11 and 12), and my UART was working just fine (the last working running program keeps sending characters on the UART and I received them as expected). The trouble is that I flashed the UART version of 4.1.1 alpha 3, instead of the TTL, I guess. So now my TTL deployment port does not answer anymore (no ping possible from MFdeploy etc), and the program still runs and occupies the UART (I can still see the character flow output from the UART).

I have tried SAM-BA on the UART with no success (and I also tried on TTL as well, same result), choosing "at91sam7x512-ek" as the board; but SAM-BA wouldn't connect, maybe because my running program keeps the UART busy I suppose.

My question: is there a way to force SAM-BA to work, or am I just hosed?

Thanks
JP

#3 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 26 November 2010 - 10:16 PM

Quiche31, We have built in multiple failsafes. Worst case, you can always erase and reflash the Netduino Mini from scratch...but you'll need an RS232 connection (to pins 1/2) if you want to do that. Before you go to that level, try this: 1. Connect a jumper wire between pin 21 (5V power) and pin 3 (DTR). 2. Remove power from your Netduino Mini. 3. Connect your PC to the TTL server port using your USB-TTL adapter/cable 4. Start up MFDeploy, select the serial port of your TTL cable. 5. Power up your Netduino Mini 6. Press PING in MFDeploy. You should get a "TinyBooter" response. 7. Now, deploy the proper firmware. You can erase your app if desired as well. Does that get you back up and running? Chris

#4 Quiche31

Quiche31

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts
  • LocationFrance

Posted 26 November 2010 - 10:24 PM

1. Connect a jumper wire between pin 21 (5V power) and pin 3 (DTR).
2. Remove power from your Netduino Mini.
3. Connect your PC to the TTL server port using your USB-TTL adapter/cable
4. Start up MFDeploy, select the serial port of your TTL cable.
5. Power up your Netduino Mini
6. Press PING in MFDeploy. You should get a "TinyBooter" response.
7. Now, deploy the proper firmware. You can erase your app if desired as well.


Unfortunately on step 6, Ping still returns "No response from device" (and DTR is forced high).
I have a working UART on 1 and 2. What should I do with it?

Thanks
JP

#5 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 26 November 2010 - 10:30 PM

Quiche31, Just to confirm, you have a working RS232 connection to COM2 (pins 1, 2) correct? If so, try repeating the procedure but connecting MFDeploy to the RS232 port instead. If that doesn't work, here's the "full erase and restore" procedure: 1. Connect 3.3V or 5V power to the gold ERASE pad (which is next to pins 11 and 12). This will fully erase your Netduino Mini, the .NET MF firmware, and your Netduino Mini app. 2. Depower your Netduino Mini. 3. Repower your Netduino Mini. 4. Using SAM-BA, connect to the RS232 port on your Netduino Mini. 5. Flash the v4.1.0.5 firmware's TinyBooterDecompressor.bin file to your Netduino Mini. 6. Depower your Netduino Mini. 7. Repower your Netduino Mini. 8. Using MFDeploy, connect to the RS232 port on your Netduino Mini and flash the desired firmware (TTL or RS232). 9. Let us know how this works :) Chris

#6 Quiche31

Quiche31

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts
  • LocationFrance

Posted 27 November 2010 - 12:03 AM

If that doesn't work, here's the "full erase and restore" procedure:
1. Connect 3.3V or 5V power to the gold ERASE pad (which is next to pins 11 and 12). This will fully erase your Netduino Mini, the .NET MF firmware, and your Netduino Mini app.
2. Depower your Netduino Mini.
3. Repower your Netduino Mini.
4. Using SAM-BA, connect to the RS232 port on your Netduino Mini.
5. Flash the v4.1.0.5 firmware's TinyBooterDecompressor.bin file to your Netduino Mini.
6. Depower your Netduino Mini.
7. Repower your Netduino Mini.
8. Using MFDeploy, connect to the RS232 port on your Netduino Mini and flash the desired firmware (TTL or RS232).


Procedure 2 did not work either, so I erased the chip by applying 5V on the gold pad. I can see that this changed something as my mini app does not emit anymore on the UART output.

I am confident that my UART cable works (its a Parallax USBto232), which I just tested on by Basic Stamp 2, which as you know have the same pins than the Mini with respect to 1, 2, 3, and power. So I can still communicate with the BS2 with Basic Stamp Editor via the UART, but still cannot communicate with the blanked Netduino Mini with SAM-BA via UART, using the same setting. I even inserted the same 220pF cap between the DTR signal and pin 3, just like what I had on the BS2.

What board do you have to select on SAM-BA? Is this "at91sam7x512-ek", as the spec for the Mini has an AT91SAM7X512, or is this another board?

Here is my setting (note that I also tried to forcing pin 3 to 5V directly, with no more success)

Posted Image

#7 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 27 November 2010 - 01:00 AM

Quiche31, First, no need to use the DTR for flashing. That DTR line is only there to force the bootloader to load. Go ahead and remove that connection. Second, SAM-BA will only communicate successfully with the AT91SAM7X512 chip on the Netduino Mini if it's the first thing to talk to it. Be sure to depower and repower the Netduino Mini immediately before running SAM-BA. Third, isn't the adapter in the diagram a USB-TTL (0V - 3.3V) adapter, rather than a USB-RS232 (-12V - 12V) serial adapter? Not sure if that's just a stock image... Chris

#8 Quiche31

Quiche31

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts
  • LocationFrance

Posted 27 November 2010 - 01:25 AM

Chris,

Thanks for your support on a Thanksgiving break!
1) Removed the DTR forcing
2) You are correct, the stock image that I used is incorrect, as the USBto232 that I am using is not available in the library, but here is its picture
3) I scanned Rx(pin 2) and Tx(pin 3) on the mini. Right after I validate on SAM-BA, I can see that Mini receives 3 bytes (6C,EE,7D) at 125000 bauds, but there is nothing sent from the Mini back to SAM-BA. Screenshot of the sequence an be seen here

Looks like the Mini ignores all input

JP

PS: You would notice that channel 3 (nothing connected there) shows a ghost of channel 0, strange...

#9 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 27 November 2010 - 01:32 AM

I scanned Rx(pin 2) and Tx(pin 3) on the mini.


Pin 2 and 3...or pin 1 and 2? Can you take a photo of your setup?

Chris

#10 Quiche31

Quiche31

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts
  • LocationFrance

Posted 27 November 2010 - 01:48 AM

Pin 2 and 3...or pin 1 and 2? Can you take a photo of your setup?


My mistake, this is 1 and 2 indeed. DTR is gone now, so 3 is left disconnected. My camera is broken so no picture, sorry...

JP

#11 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 27 November 2010 - 01:51 AM

Quiche31, Honestly, there's very little that can go wrong in an erase-and-reflash operation as long as the serial port supports true RS232. I have noticed that some USB-RS232 adapters have trouble with SAM-BA. Do you have a camera on your mobile phone? [Just trying to figure out how to get you up and running here.] Chris

#12 Quiche31

Quiche31

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts
  • LocationFrance

Posted 27 November 2010 - 02:03 AM

Honestly, there's very little that can go wrong in an erase-and-reflash operation as long as the serial port supports true RS232.
I have noticed that some USB-RS232 adapters have trouble with SAM-BA.
Do you have a camera on your mobile phone?


The only camera I have is on my phone which is out of order. I'll manage to send a picture tomorrow though. The USB to RS232 that I use is the one from Parallax. I'll check tomorrow if it does real RS232 or not, too bad that I don't have a real scope.

Thanks for now Chris, I really appreciate your support.

JP

#13 Quiche31

Quiche31

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts
  • LocationFrance

Posted 27 November 2010 - 04:29 PM

So here is the picture of my re-flash setting
Posted Image

The various voltages:
Pin 24: 8.42 V
Pin 23: 0 V
Pin 21: 5.04 V
Pin 1: 6.03 V (blue wire: UART Rx)
Pin 2: 6.31 V (yellow wire: UART Tx) (red wire: UART DTR disconnected)

I have posted a support request to Parallax in order to get more information on their USBto232, as there is no datasheet available on their site.

JP

#14 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 27 November 2010 - 06:56 PM

Quiche31, That all looks correct, and is pretty much exactly how we program them at Secret Labs (except with a dedicated programming/test board, a power brick, and a Keyspan USB-RS232 adapter). Can you remove power from your Netduino Mini, repower it, and then try to connect from SAM-BA again...and post a screenshot of what error SAM-BA gives when you try to connect? Chris

#15 Quiche31

Quiche31

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts
  • LocationFrance

Posted 28 November 2010 - 10:26 AM

The version that I am using is SAM-BA CDC 2.10, which I downloaded from http://www.atmel.com...sam-ba_2.10.exe

When I start the UI, the dialog box below appears, I select the board (at91sam7xc512-ek) and click Connect. The dialog disappears and nothing visually happens. As said before there are 3 bytes (0x6c 0xee 0x7d)sent to chip via the UART , and nothing received. I need to kill the process via Task Manager to release the com port.
Posted Image
There is no log produced, so I start SAM-BA via a command line, redirecting to a log file:
C:\Program Files\ATMEL Corporation\SAM-BA v2.10>sam-ba_cdc.exe com5 at91sam7xc512-ek > log.txt

The command returns immediately and the following file log.txt is produced:
-I- Waiting ...
-I- TCL platform : Windows NT
-I- SAM-BA CDC 2.10  on : windows
-I- Retrieved arguments from command line :
-I- argv 0 : com5
-I- argv 1 : at91sam7xc512-ek
-I- argv 2 : 
-I- Connection : com5 (target(comType) = 3)
-I- Board : at91sam7xc512-ek
-I- Traces Level : 4
-I- target(handle) : file17aa870

1) Is it possible that I use a wrong version of SAM-BA? Maybe you can post the link to the version that you use at Secret Labs?
2) The doc (readme_cdc.txt) mentions that this version only works with a USB CDC Driver. The driver that I am using on the COM5 port is FTDI; this may be a problem, but there is no USB CDC Driver that I can find for Windows 7. Would you have a pointer to such a driver?

Last minute edit: Suspecting Windows 7, I installed FTDI driver and SAM-BA in a Windows XP virtual machine, and SAM-BA works! So I am finally making some progress... will keep you updated

Thanks
JP

#16 Quiche31

Quiche31

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts
  • LocationFrance

Posted 28 November 2010 - 06:44 PM

...
5. Flash the v4.1.0.5 firmware's TinyBooterDecompressor.bin file to your Netduino Mini.
6. Depower your Netduino Mini.
7. Repower your Netduino Mini.
8. Using MFDeploy, connect to the RS232 port on your Netduino Mini and flash the desired firmware (TTL or RS232).


Chris, could you post TinyBooterDecompressor.bin for Mini?
You have provided the sources and project files, but I am not sure to have all the required environment (and skills) to build from source, as shown below:

C:\Data\Netduino\Firmware\NetduinoMini\TinyBooter>c:\windows\microsoft.NET\framework\v3.5\msbuild TinyBooterDecompressor.proj /t:build /p:flavor=release;memory=flash
Microsoft (R) Build Engine Version 3.5.30729.4926
[Microsoft .NET Framework, Version 2.0.50727.4952]
Copyright (C) Microsoft Corporation 2007. All rights reserved.

C:\Data\Netduino\Firmware\NetduinoMini\TinyBooter\TinyBooterDecompressor.proj(16,11): error MSB4019: 
The imported project "C:\tools\targets\Microsoft.SPOT.System.Settings" was not found. Confirm that the path in the
 <Import> declaration is correct, and that the file exists on disk.
Thanks
JP

#17 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 28 November 2010 - 08:04 PM

Quiche31, First of all, so glad that SAM-BA is now working for you. Yes, a word of warning: the new SAM-BA v2.10 struggles a bit on Windows 7 in the drivers department. I personally downgraded to SAM-BA 2.09 on my Windows 7 machine. As for the Mini's TinyBooterDecompressor.bin, use the production version in the following thread: http://forums.netdui...-v410-update-5/ Finally, for the build errors...you'll need to set up your environment path first. You need to run "setenv_###.cmd" from the \MicroFrameworkPK_v4_1 folder. Your output is looking for files in the "c:\tools" directory instead of "c:\MicroFrameworkPK_v4_1..." Chris

#18 Quiche31

Quiche31

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts
  • LocationFrance

Posted 28 November 2010 - 10:57 PM

First of all, so glad that SAM-BA is now working for you. Yes, a word of warning: the new SAM-BA v2.10 struggles a bit on Windows 7 in the drivers department. I personally downgraded to SAM-BA 2.09 on my Windows 7 machine.

As for the Mini's TinyBooterDecompressor.bin, use the production version in the following thread:
http://forums.netdui...-v410-update-5/


Chris,

Thank you for your help. I have finally succeeded to flash the Mini with the v4.1.1 Alpha 3 firmware, and it works like a charm. So here is the take away from my experience: don't try SAM-BA v2.10 on Windows 7, or you won't be able to connect

It was a rather long thread that somehow polluted your Netduino Mini (Beta) announcement, so feel free to discard what you think should be removed.
And a big thanks for your support again. Case closed.

JP

#19 adam

adam

    New Member

  • Members
  • Pip
  • 4 posts

Posted 21 December 2010 - 05:33 AM

Is there a link to SAM-BA 2.09 ? I'm currently trying to flash my mini running into the same issue.


Chris,

Thank you for your help. I have finally succeeded to flash the Mini with the v4.1.1 Alpha 3 firmware, and it works like a charm. So here is the take away from my experience: don't try SAM-BA v2.10 on Windows 7, or you won't be able to connect

It was a rather long thread that somehow polluted your Netduino Mini (Beta) announcement, so feel free to discard what you think should be removed.
And a big thanks for your support again. Case closed.

JP



#20 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 21 December 2010 - 05:48 AM

Is there a link to SAM-BA 2.09 ? I'm currently trying to flash my mini running into the same issue.


Hi adam,

Welcome to the Netduino community.

Programming the Netduino Mini is done via a virtual serial port...so in theory it should work with any version of SAM-BA...

What issue are you having, exactly, flashing a Netduino Mini using SAM-BA 2.10 on your computer?

Chris




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.