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

Shield Base Firmware (beta 4)


  • Please log in to reply
32 replies to this topic

#1 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 09 October 2012 - 06:15 AM

Version: Beta 4 (based on 4.2 beta NETMF firmware) This update requires a Netduino Go running v4.2.0.2+ firmware. This firmware uses the GoBus 1.5 UART transport, so it temporarily requires use of 4 GoPorts (1-4 or 5-8). We will remove this restriction in an upcoming release by moving to the fast GoBus 1.5 SPI transport. Because this firmware uses an un-optimized implementation of the GoBus UART transport, SerialPort and SPI operations run at a reduced speed. This firmware includes the following updates: 1. SerialPort support (COM2/COM3 on pins D2-D3/D7-D8; COM1 is temporarily reserved for debugging) 2. SPI support (SPI1 on pins D11-D13) 3. New ShieldBase.SerialPorts and ShieldBase.SPI_Devices enumerations This firmware includes the previous updates: 1. GoBus 1.5 transport: error-correction with CRCs, frame acknowledgements, retries, etc. 2. InterruptPort support (pins D2-D13, although A0-A5 can be used by advanced users) 3. New ShieldBase.PWMChannels and ShieldBase.AnalogInputs enumerations (matching Netduino 4.2) 4. PWM no longer stops working 'randomly' 5. PWM scale now works properly Known issues: 1. Pins D0-D1 are occupied by the NETMF debug channel. We'll free these up in an upcoming update. NOTE: if you are using your Shield Base (with upgraded STM32F2 chip) as a standalone NETMF board, you'll want to continue using the production 4.2.0.0 NETMF firmware. To upgrade your Shield Base: 1. Plug your Shield Base into GoPort 5 on your Netduino Go. 2. Deploy the attached updater app, and watch your Output window. 3. When prompted, press the Netduino Go's onboard button to start the flashing process. 4. While flashing your Shield Base, GoPort 5's LED will flash and the Output window will provide status. 5. When the Shield Base is completely updated, the white power LED will flash. After the upgrade, simply deploy a new app to your Netduino Go mainboard. If you have trouble communicating with the shield base, power cycle your Netduino Go. Please post in this thread if you have any troubles. Thank you for beta testing the Shield Base, Chris

Attached Files


Edited by Chris Walker, 07 January 2013 - 07:29 AM.
updated reflashing app for Netduino Go 4.2.1 firmware

  • Gutworks and neslekkim like this

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 09 October 2012 - 06:16 AM

P.S. To update your current project using Shield Base: 1. Remove the NetduinoGo.ShieldBase.dll assembly reference from your current project. 2. Add the attached NetduinoGo.ShieldBase.dll assembly as a reference to your project. This update should be fully backwards compatible with your existing code. For interested parties...we've also included the current beta source to NetduinoGo.ShieldBase.dll, the GoBusSerialTransport.dll, and the ShieldBaseProxyServer app (which runs on the Shield Base). Chris P.P.S. Once Shield Base leaves beta, we'll include it in the official Netduino SDK. This assembly update procedure is only required during the beta. UPDATE: version 0.3.1 now provides preliminary support for the /RESET pin on Shield Base.

Attached Files


Edited by Chris Walker, 08 November 2012 - 01:34 AM.
updated attachment to version 0.3.1.0

  • Gutworks and neslekkim like this

#3 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 09 October 2012 - 06:28 AM

To use the SPI bus on the Shield Base, specify the ShieldBase SPI bus in your SPI.Configuration constructor:
ShieldBase.SPI_Devices.SPI1 /* pins D11-D13 */

Example:
NetduinoGo.ShieldBase shieldBase = new NetduinoGo.ShieldBase(GoSockets.Socket5);
SPI spi = new SPI(new SPI.Configuration(shieldBase.Pins.GPIO_PIN_D10, ... , shieldBase.SPI_Devices.SPI1));
To use a SerialPort on the Shield Base, specify one of the ShieldBase ports as PortName in your SerialPort constructor:
ShieldBase.SerialPorts.COM2 /* pins D2-D3, RTS/CTS on pins D7-D8 */
ShieldBase.SerialPorts.COM3 /* pins D7-D8 */

// example:
NetduinoGo.ShieldBase shieldBase = new NetduinoGo.ShieldBase(GoSockets.Socket5);
SerialPort serialPort = new SerialPort(shieldBase.SerialPorts.COM2, 115200, Parity.None, 8, StopBits.One);
We'll also be making ShieldBase.SerialPorts.COM1 (pins D0-D1) available a bit later in the beta.

Chris
  • Arron Chapman , Gutworks and neslekkim like this

#4 Gutworks

Gutworks

    Advanced Member

  • Members
  • PipPipPip
  • 363 posts
  • LocationOttawa, Ontario

Posted 09 October 2012 - 12:14 PM

Now where's that dancing emoticon when you need it?! Woot woot! :D

#5 Gutworks

Gutworks

    Advanced Member

  • Members
  • PipPipPip
  • 363 posts
  • LocationOttawa, Ontario

Posted 09 October 2012 - 12:50 PM

I have successfully upgraded my Netduino go and Shield Base! Now to start creating some projects using Serial and SPI.

If anyone else, like myself, is anxious to start creating new projects using the Shield Base, I created a pin out reference for the Shield Base to help me remember what pin does what. Though keep in mind that the I2C and COM1 ports are still enabled.

Updated Netduino Go! Shield Base Pinout

Cheers,
Steve

Edited by Gutworks, 09 October 2012 - 05:16 PM.


#6 Gutworks

Gutworks

    Advanced Member

  • Members
  • PipPipPip
  • 363 posts
  • LocationOttawa, Ontario

Posted 09 October 2012 - 01:05 PM


This firmware includes the following updates:
1. SerialPort support (COM2/COM3 on pins D2-D3/D7-D8; COM1 is temporarily reserved for debugging)
2. SPI support (SPI1 on pins D10-D12)
3. New ShieldBase.SerialPorts and ShieldBase.SPI_Devices enumerations


Chris is SPI on D10-D12 or D11-D13 like the Netduino Plus?

And also is SPI NSS enabled on D4?

I'm updating the pin out to reflect the recent changes so as not to confuse anyone and just wanted to clarify.

Steve

#7 supra

supra

    Advanced Member

  • Members
  • PipPipPip
  • 210 posts
  • LocationOntario, Canada

Posted 09 October 2012 - 01:50 PM

Thank. I had to started all over again

#8 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 09 October 2012 - 04:10 PM

Hi Gutworks,

Chris is SPI on D10-D12 or D11-D13 like the Netduino Plus?

And also is SPI NSS enabled on D4?

I'm updating the pin out to reflect the recent changes so as not to confuse anyone and just wanted to clarify.

Good catch. Yes, SPI is pins D11-D13. I just corrected the first post in this thread.

Any of the pins can be used as SPI chip select for your SPI devices. Pin D4 is technically SPI_NSS for those advanced hackers who want to create specialized SPI Slave code for NETMF. It's also very useful as a dedicated SPI_CS pin when you need to use all the PWM and UART features on all the other digital pins.

Chris

#9 Gutworks

Gutworks

    Advanced Member

  • Members
  • PipPipPip
  • 363 posts
  • LocationOttawa, Ontario

Posted 09 October 2012 - 04:58 PM

To test the SerialPort I created a simple test using an XBee on COM2. Unfortunately I couldn't get my Sparkfun XBee shield to work when switching to Dline mode (UART mode uses D0-D1 which are disabled for now, and I believe Dline allows you to use D2-D3), so instead I am using an XBee breakout board on my breadboard and have Dout connected to D2 and Din connected to D3.

Edit: The XBee Shield does work when switching to DLINE. I jumped to conclusions blaming the shield for the flash bug issue, mentioned below.

Here is the code sample I am using.

NetduinoGo.ShieldBase shieldBase = new NetduinoGo.ShieldBase(GoSockets.Socket5);

SerialPort serialPort = new SerialPort(shieldBase.SerialPorts.COM2, 57600, Parity.None, 8, StopBits.One);

serialPort.Open();

string Text = "Hello World!";
// Uses the Toolbox.NETMF.Tools found on Stefan's awesome .NET Micro Framework Toolbox
// http://netmftoolbox.codeplex.com/wikipage?title=Toolbox.NETMF.Tools
byte[] TextAsByte = Tools.Chars2Bytes(Text.ToCharArray());  

// If you do not currently use the NETMF Toolbox you can also use the following: 
//byte[] TextAsByte = System.Text.Encoding.UTF8.GetBytes(Text);

while(true)
{
    serialPort.Write(TextAsByte, 0, TextAsByte.Length);
    Thread.Sleep(1000);
}

To view a response I have another XBee connected to the Sparkfun Xbee Explorer and configured on the PC's COM3. I am using PuTTy as a terminal to receive the responses from the XBee connected to the shield base.

PuTTY Setup - Attached File  XBee-PuTTy_Setup.gif   25.05KB   52 downloads

XBee Response - Attached File  XBee-Output.gif   96.18KB   50 downloads

I can deploy the app and successfully communicate between both XBees. However, if I make any slight change to the code, for instance change the Text string, and redeploy, the app starts and immediately exists without any errors. The only way I can get it to redeploy is to disconnect and reconnect my Netduino Go, and close Visual Studio and then reopen the project.

I had similar issues with PWM when the Shield Base was using Beta 1 firmware, which has since been fixed.

Any suggestions?
Steve

Edited by Gutworks, 10 October 2012 - 09:27 PM.


#10 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 09 October 2012 - 07:23 PM

Hi Steve, Is there any chance you can create a simple repro project for me which doesn't require any additional hardware (other than a Netduino Go and a Shield Base)? I can bring it into the lab and figure out why Visual Studio is losing its connection to the debugger. Thank you for the excellent feedback, Chris

#11 Gutworks

Gutworks

    Advanced Member

  • Members
  • PipPipPip
  • 363 posts
  • LocationOttawa, Ontario

Posted 09 October 2012 - 08:45 PM

Hi Chris, It actually did not matter what code I deployed, the issue was appearing even with a simple Debug.Print(). Though I do think we have discovered the issue, as discussed in our chat. It would seem that when deploying the large Shield Base flashing application, it corrupts the Netduino Go mainboard. In order to fix the issue, I had to erase the Netduino Go using DfuSe Demo and reflash the firmware on the mainboard. Now I have no issue in deploying my apps over and over again. As discussed, I think it would be best to upgrade the Shield Base before flashing the Netduino Go. Perhaps a note can be added in the Netduino Go thread? Thank you for your help! Steve

#12 Lunddahl

Lunddahl

    Advanced Member

  • Members
  • PipPipPip
  • 152 posts
  • LocationEurope, Denmark

Posted 11 October 2012 - 12:35 AM

Version: Beta 4 (based on 4.2 beta NETMF firmware)

This update requires a Netduino Go running v4.2.0.2+ firmware.


The Link is wrong :-)

You are linking to:
Topic: 5691 - Netduino Go Firmware v4.2.0 (Update 1) GoBus 1.5, InterruptPort, and threading updates.

Should be:
Topic: 5916 - Netduino Go Firmware v4.2.0 (Update 2) Vrtualized SerialPort and Virtualized SPI support for Shield Base.

- Ulrik

#13 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 11 October 2012 - 01:09 AM

The Link is wrong :-)

Good catch, Ulrik. Thank you. Now fixed.

#14 Lunddahl

Lunddahl

    Advanced Member

  • Members
  • PipPipPip
  • 152 posts
  • LocationEurope, Denmark

Posted 11 October 2012 - 09:07 AM

Good catch, Ulrik. Thank you. Now fixed.


Figured it out the hard way, still have marks on my forehead and the dog is a little afraid of me this morning...

Well, it just shows that I care and have a big passion about this electronics stuff :D :D :D

#15 Nicky

Nicky

    Advanced Member

  • Members
  • PipPipPip
  • 78 posts
  • LocationDenmark

Posted 15 October 2012 - 11:34 AM

Am I the only one, who gets "AsyncEventReceived | profile: 128; instance: 6; function: 5" everytime an InterruptPort gets interrupted?

ntools
TCP Listener (Beta) · FTP Server (Alpha)
Netduino Plus Go Module · Xml Parser
http://ntools.codeplex.com/


#16 Gutworks

Gutworks

    Advanced Member

  • Members
  • PipPipPip
  • 363 posts
  • LocationOttawa, Ontario

Posted 15 October 2012 - 12:37 PM

Am I the only one, who gets "AsyncEventReceived | profile: 128; instance: 6; function: 5" everytime an InterruptPort gets interrupted?

I haven't yet. Do you have a code sample that I can test for you to see if I get the same result?

Steve

#17 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 15 October 2012 - 06:42 PM

Hi Nicky,

Am I the only one, who gets "AsyncEventReceived | profile: 128; instance: 6; function: 5" everytime an InterruptPort gets interrupted?

Are you using the NetduinoGo.ShieldBase.dll that came with beta 4 (v0.3)?

Chris

#18 Nicky

Nicky

    Advanced Member

  • Members
  • PipPipPip
  • 78 posts
  • LocationDenmark

Posted 16 October 2012 - 06:44 AM

Hi Nicky,


Are you using the NetduinoGo.ShieldBase.dll that came with beta 4 (v0.3)?

Chris


:facepalm: !!!!

I don't know what I was thinking yesterday... first the Win8 thing, and now this.. Thanks.

ntools
TCP Listener (Beta) · FTP Server (Alpha)
Netduino Plus Go Module · Xml Parser
http://ntools.codeplex.com/


#19 andrew6071

andrew6071

    Member

  • Members
  • PipPip
  • 18 posts
  • LocationUK

Posted 27 October 2012 - 06:15 PM

Hi, I want to update my shield base firmware so i can use the serial ports etc with the go, but I also want to be able to use it as a stand alone device. If i update the firmware with this firmware where do i get the firmware to be able use it standalone ? Can I just update the shieldbase as per Stefan's post here http://forums.netdui...dpost__p__25981 Hope that makes sense :) Thanks Andrew

#20 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 27 October 2012 - 06:27 PM

Hi Andrew, If you want to go back to writing standalone NETMF code on your limited-edition Shield Base (with 512KB flash), just run the following reflash app: http://forums.netdui...-based-modules/ 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.