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 Firmware v4.2.0 RC4 (Netduino + Netduino Plus)


  • Please log in to reply
152 replies to this topic

#81 Jeka

Jeka

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts

Posted 28 February 2012 - 02:06 PM

Hi Ahmed,

The RC4 build has 48KB of flash for your application (not 64KB like .NET MF 4.1 provides).

We're working to increase the amount of flash available for applications...NETMF 4.2 grew a bit :)

Chris

Hi Chris, you are not answered on my question, i think you are just missed it. =(

Hello, i have two boards. I want flash one of them to 4.2 RC4. For develop with 4.2 version i need .NET MF 4.2 SDK.
If i install 4.2 SDK i need remove 4.1 SDK. Can i resume develop for board with 4.1 version of .NET MF?



#82 Guest_Ahmed Osman_*

Guest_Ahmed Osman_*
  • Guests

Posted 28 February 2012 - 02:08 PM

Hi Ahmed,

The RC4 build has 48KB of flash for your application (not 64KB like .NET MF 4.1 provides).

We're working to increase the amount of flash available for applications...NETMF 4.2 grew a bit :)

Chris

I'm unable to find the .NET MF 4.2 RC3 link to flash it back :)
http://forums.netdui...c3-all-editions

#83 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 28 February 2012 - 02:18 PM

Jeka -- you can switch back to .NET MF 4.1 on your board (the latest production build), no problem! Ahmed -- if you PM me, I can get you a copy of RC3. But I would _highly_ recommend staying either with a production build (4.1.0.6) or using the latest beta. Chris

#84 Jeka

Jeka

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts

Posted 28 February 2012 - 06:01 PM

No, i mean, can i simultaneously develop 4.1 board and 4.2 board with .NET MF 4.2 SDK? I have two board with 4.2 and 4.1

#85 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 28 February 2012 - 06:48 PM

No, i mean, can i simultaneously develop 4.1 board and 4.2 board with .NET MF 4.2 SDK?
I have two board with 4.2 and 4.1

Yes, absolutely. The .NET MF 4.2 SDK supports boards running .NET MF 4.1 and 4.2 (along with a few other earlier versions).

Chris

#86 Jeka

Jeka

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts

Posted 28 February 2012 - 06:53 PM

Oh, cool! Thanks! =)

#87 Jeka

Jeka

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts

Posted 28 February 2012 - 09:25 PM

On codeplex allow QFE1 version of RTM 4.2 of SDK. Can i use it? Or i should use only 4.2 RTM?

#88 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 28 February 2012 - 09:57 PM

Yes, you can upgrade to the QFE1 SDK. This may actually be required for the RTM firmware. Chris

#89 lor3

lor3

    Member

  • Members
  • PipPip
  • 12 posts

Posted 29 February 2012 - 07:02 PM

Just to add to the SD card woes (with n+/rc4)... Using a Sandisk 4Gb (FAT) it seems on the device you can read/write the card as normal, except it won't read files/directories created on a PC and the PC won't see files/directories created on the netduino. As far as I can tell the two contents co-exist happily, will do more investigation tomorrow. In the meantime I've ordered some 2Gb cards but as people have said these are now quite rare (and getting more expensive). Just to update on this, I've been looking at the FS and it seems like the netduino is reading the sector size as 2048 rather than 512, putting the FAT/Rootdir at giant offsets (so not visible to Windows/Linux mounting the FS) and spreading content all over the disk. I'll have a go at locating the issue later, don't have the netduino build environment set up yet.

Edited by lor3, 01 March 2012 - 12:20 PM.


#90 DrJaymz

DrJaymz

    Advanced Member

  • Members
  • PipPipPip
  • 42 posts

Posted 02 March 2012 - 09:14 AM

Before I get excited does this: 1) fix the usb deployment that fails and blue screens the machine. 2) contain the missing math functions like math.pow(x,y) which previously threw a wobbly with not implemented exception.

#91 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 02 March 2012 - 03:46 PM

Hi DrJaymz, The floating point math support from 4.1 is back in the 4.2 RC4 release. Yes :) The USB deployment issue was patched by Microsoft in the "4.2 beta" drivers. Be sure to update to them...and let us know if you have any more BSOD issues. Thank you for helping to test .NET MF 4.2! Chris

#92 FredDotNet

FredDotNet

    New Member

  • Members
  • Pip
  • 4 posts

Posted 03 March 2012 - 05:41 PM

Hi, I can't get the SD card working on my Netduino Plus running on v4.2.0 RC4(and updated bootloader). The VolumeInfo.GetVolumes() method returns a empty array and writing or reading to the SD card throws a exception. I've tested with two different SD cards of 2 GB (Kingston and TDK). Any tips or suggestions? Regards, Fred

#93 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 03 March 2012 - 07:12 PM

Hi Fred,

I can't get the SD card working on my Netduino Plus running on v4.2.0 RC4(and updated bootloader).

The VolumeInfo.GetVolumes() method returns a empty array and writing or reading to the SD card throws a exception.

I've tested with two different SD cards of 2 GB (Kingston and TDK).

Any tips or suggestions?

Did both of these work in .NET MF 4.1? If so, there's probably a glitch in the 4.2 beta SD drivers. They've been changed quite a bit.

If these worked in .NET MF 4.1, could you please file a bug report at netduino.codeplex.com? And then we'll address all the SD bugfixes at once in a few weeks and build updated firmware?

Chris

#94 Bainesbunch

Bainesbunch

    Advanced Member

  • Members
  • PipPipPip
  • 61 posts
  • LocationFrance

Posted 12 March 2012 - 08:38 PM

Hi Chris, How far are we off seeing a release of 4.2, or another RC. Cheers Pete.
I was going to change the world, then I discovered Netduino.
The world will have to wait.

#95 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 12 March 2012 - 08:40 PM

Target for the next beta is 2-3 weeks from today. There will be a lot of updated code pulled into it. Chris

#96 rhamer

rhamer

    Member

  • Members
  • PipPip
  • 29 posts
  • LocationMelbourne Australia

Posted 12 March 2012 - 10:45 PM

Target for the next beta is 2-3 weeks from today. There will be a lot of updated code pulled into it.

Chris


Is any of it in the I2C area?

Unfortunately I am very close to having to abandon the Netduino Plus as the essential things I need (I2C & VB) are just not working properly yet.

Add to that the constant IDE crashes and the occasional Blue Screen when pressing the Netduino reset button during a download and I'm not making any progress at all, while my deadline grows nearer.

I really don't want to sound like a complainer, and I know this is only Beta firmware, but it has been in Beta for a while, and I cant see the roadmap or timeframe. is there one?

Regards

Rohan

#97 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 13 March 2012 - 01:00 AM

Hi rhamer,

Is any of it in the I2C area?

Add to that the constant IDE crashes and the occasional Blue Screen when pressing the Netduino reset button during a download and I'm not making any progress at all, while my deadline grows nearer.

I really don't want to sound like a complainer, and I know this is only Beta firmware, but it has been in Beta for a while, and I cant see the roadmap or timeframe. is there one?

If I2C isn't working, and you've verified that there's a bug in the Netduino's implementation (using a logic analyzer), please let me know. We have no I2C bugs in the bug tracking system.

Regarding the BSOD... Are you using the .NET MF 4.2 beta drivers? They include a BSOD fix for a buffer overflow error which we were seeing crop up. These are the official NETMF drivers.

We expect to have an updated RC in the next 2-3 weeks. We're pulling in bug fixes from Microsoft and the community and from within Secret Labs as bugs are identified and fixed. .NET MF 4.2 is almost ready for prime-time; we plan to move it to RTM as soon as users say that it's ready.

Thank you very much for all the feedback and information,

Chris

#98 rhamer

rhamer

    Member

  • Members
  • PipPip
  • 29 posts
  • LocationMelbourne Australia

Posted 13 March 2012 - 03:18 AM

Hi Chris,

Thanks for the reply. I really dont want to be one of those whinging types.

The I2C bus is here http://forums.netdui...h__1#entry22811

I dont know about the beta drivers, I don't think so as I'm not sure where they fit into the environment. I just followed the instructions posted by another user and it didn't include anything for the IDE/PC end. What exactly are they for and how do I use them?

One more thing with regard to the I2C classes, is the inability to connect to more than 1 device. There seems to be some home brew classes to get around this, but nothing with clear instructions on how to use them. I see this as a huge deficiency in the I2C routines as the whole point is I2C is a bus. Having said that, if there is an official workaround (for VB) that you recommend I would be happy to use it.

BTW just so you know, the project I'm working on is a commercial application that will need 15 NetDuino Plus' to control various pieces of hardware, but it also needs to be rock solid. I hope things can be turned around soon as I only have a few more days before I will have to decide to stick with the ND or look somewhere else.

Thanks again for your help.

Regards

Rohan

#99 gbreder

gbreder

    Advanced Member

  • Members
  • PipPipPip
  • 53 posts
  • LocationGermany

Posted 14 March 2012 - 10:28 PM

Hi Rohan,
to get your I2C bus working you can use a class like this:

using System;
using System.Reflection;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;

namespace Netduino.Extender.TransferAdapters
{
	/// <summary>
	/// Wire-up the I2C device to the Netduino as follows:
	/// SDA -> Analog Pin 4;
	/// SCL -> Analog Pin 5;
	/// GND -> GND.
	/// </summary>
	public sealed class I2CAdapter
	{
		private static readonly Object _I2CLock = new object();
		private static readonly I2CAdapter _Instance = new I2CAdapter();

		private readonly I2CDevice _I2CDevice;

		/// <summary>Creates a new <see cref="I2CAdapter"/> instance </summary>
		/// <remarks>
		/// At this time the .NET Micro Framework only supports a single I2C bus. 
		/// Therefore, creating more than one I2CAdapter instance will generate an
		/// exception. 
		/// </remarks>
		private I2CAdapter()
		{
			//Initialize the I2CDevice with a dummy configuration
			_I2CDevice = new I2CDevice(new I2CDevice.Configuration(0, 0));
		}

		public static I2CAdapter Instance
		{
			get { return _Instance; }
		}

		private I2CDevice.I2CWriteTransaction CreateInternalAddressWriteTransaction(byte[] buffer, uint internalAddress,
		                                                                            byte internalAddressSize)
		{
			I2CDevice.I2CWriteTransaction writeTransaction = I2CDevice.CreateWriteTransaction(buffer);

			ModifyToRepeatedStartTransaction(internalAddress, internalAddressSize, writeTransaction,
			                                 typeof (I2CDevice.I2CWriteTransaction));

			return writeTransaction;
		}

		private I2CDevice.I2CReadTransaction CreateInternalAddressReadTransaction(byte[] buffer, uint internalAddress,
		                                                                          byte internalAddressSize)
		{
			I2CDevice.I2CReadTransaction readTransaction = I2CDevice.CreateReadTransaction(buffer);

			ModifyToRepeatedStartTransaction(internalAddress, internalAddressSize, readTransaction,
			                                 typeof (I2CDevice.I2CReadTransaction));

			return readTransaction;
		}

		/// <summary>
		/// To use the new I2C InternalAddress feature (repeated start bit) in the v4.1.1 alpha,
		/// add the following method to your code...
		/// and then call it instead of built-in I2CDevice.CreateWriteTransaction/CreateReadTransaction functions when appropriate.
		/// </summary>
		/// <param name="internalAddress"></param>
		/// <param name="internalAddressSize">The InternalAddressSize parameter defines
		/// the # of bytes used to represent the InternalAddress. The InternalAddress is a set of bytes sent to a device before the
		/// buffer--often a register # or memory location to write/read. When used in an I2C ReadTransaction, an extra start bit will
		/// be sent to the I2C device after the InternalAddress (followed by the traditional buffer read/write).</param>
		/// <param name="transaction"></param>
		/// <param name="transactionType"></param>
		private static void ModifyToRepeatedStartTransaction(uint internalAddress, byte internalAddressSize,
		                                                     I2CDevice.I2CTransaction transaction, Type transactionType)
		{
			FieldInfo fieldInfo = transactionType.GetField("Custom_InternalAddress",
			                                               BindingFlags.NonPublic | BindingFlags.Instance);
			fieldInfo.SetValue(transaction, internalAddress);

			fieldInfo = transactionType.GetField("Custom_InternalAddressSize", BindingFlags.NonPublic | BindingFlags.Instance);
			fieldInfo.SetValue(transaction, internalAddressSize);
		}

		public int WriteInternalAddressBytes(I2CDevice.Configuration i2CConfiguration, byte[] bytesToWrite,
		                                     uint internalAddress, byte internalAddressSize)
		{
			int bytesTransfered = ExecuteI2CTransactions(i2CConfiguration,
			                                             CreateInternalAddressWriteTransaction(bytesToWrite, internalAddress,
			                                                                                   internalAddressSize));

			// I2CDevice.Execute returns the total number of bytes transfered in BOTH directions for all transactions
			if (bytesTransfered < (bytesToWrite.Length))
			{
				Debug.Print("WriteInternalAddressBytes: I2C expected + '" + bytesToWrite.Length + "' but could write + '" +
				            bytesTransfered + "'.");
			}

			return bytesTransfered;
		}

		public int ReadInternalAddressBytes(I2CDevice.Configuration i2CConfiguration, byte[] bytesToRead, uint internalAddress,
		                                    byte internalAddressSize)
		{
			int bytesTransfered = ExecuteI2CTransactions(i2CConfiguration,
			                                             CreateInternalAddressReadTransaction(bytesToRead, internalAddress,
			                                                                                  internalAddressSize));

			// I2CDevice.Execute returns the total number of bytes transfered in BOTH directions for all transactions
			if (bytesTransfered < (bytesToRead.Length))
			{
				Debug.Print("ReadInternalAddressBytes: I2C expected + '" + bytesToRead.Length + "' but could read + '" +
				            bytesTransfered + "'.");
			}

			return bytesTransfered;
		}

		public int WriteBytes(I2CDevice.Configuration i2CConfiguration, byte[] bytesToWrite)
		{
			int bytesTransfered = ExecuteI2CTransactions(i2CConfiguration, I2CDevice.CreateWriteTransaction(bytesToWrite));

			// I2CDevice.Execute returns the total number of bytes transfered in BOTH directions for all transactions
			if (bytesTransfered < (bytesToWrite.Length))
			{
				Debug.Print("WriteBytes: I2C expected + '" + bytesToWrite.Length + "' but could write + '" + bytesTransfered + "'.");
			}

			return bytesTransfered;
		}

		public int ReadBytes(I2CDevice.Configuration i2CConfiguration, byte[] bytesToRead)
		{
			int bytesTransfered = ExecuteI2CTransactions(i2CConfiguration, I2CDevice.CreateReadTransaction(bytesToRead));

			// I2CDevice.Execute returns the total number of bytes transfered in BOTH directions for all transactions
			if (bytesTransfered < (bytesToRead.Length))
			{
				Debug.Print("ReadBytes: I2C expected + '" + bytesToRead.Length + "' but could read + '" + bytesTransfered + "'.");
			}

			return bytesTransfered;
		}

		/// <summary>
		/// 
		/// </summary>
		/// <param name="configuration">Netduino needs only the 7 most significant bits for the address e.g. 0x91 >> 1 = 0x48.</param>
		/// <param name="transaction"></param>
		/// <returns></returns>
		private int ExecuteI2CTransactions(I2CDevice.Configuration configuration, I2CDevice.I2CTransaction transaction)
		{
			lock (_I2CLock)
			{
				_I2CDevice.Config = configuration;

				// Execute the read or write transaction, check if byte was successfully transfered
				int bytesTransfered = _I2CDevice.Execute(new[] {transaction}, 100);
				return bytesTransfered;
			}
		}
	}
}
This class takes a I2CDevice.Configuration for each read and write and can be used multiple times for diffrent devices. It should be tread-safe. To get an instance of this class please call "I2CAdapter.Instance" (singleton pattern). The Read/WriteInternalAddressBytes methods are used in Firmware 4.1.1 beta 1. The rest of the code works brillint in 4.2.x. If there are errors in my code or if there are suggestions for improvement please let me know.
Now you should be able to use the one I2C bus of your Netduino with ease for diffrent devices.

Regards
Guido

#100 Doctor Bit

Doctor Bit

    Member

  • Members
  • PipPip
  • 14 posts

Posted 15 March 2012 - 11:34 PM

Hi all, I try to deploy a simple application to a ND+ but if I add a reference to System.Http.dll the deployment doesn't work. VS show me this error: An error has occurred. Please check your hardware. And output window show this: Incrementally deploying assemblies to device Deploying assemblies for a total size of 49936 bytes Assemblies not successfully deployed to device. Deployment to the device was not successful. If I remove that dll all works fine... any idea?




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.