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.

daGuy's Content

There have been 3 items by daGuy (Search limited from 27-April 23)


By content type

See this member's

Sort by                Order  

#38264 PWM freezes Netduino in 4.2.0.1 Firmware

Posted by daGuy on 30 October 2012 - 10:05 PM in Netduino 2 (and Netduino 1)

I haven't experienced any issues like this with the latest firmware. Can you post a simple code sample and I will try to reproduce it?

Steve



I actually wrote a new code fragment to test it out and it seems to be working now. I am using this piece:

public class Program
{
	public static void Main()
	{
		PWM pwm = new PWM(PWMChannels.PWM_PIN_D5, 1000, 500, PWM.ScaleFactor.Microseconds, false);

		OutputPort led = new OutputPort(Pins.ONBOARD_LED, false);
		Boolean ledState = false;
		while (true)
		{
			led.Write(ledState);
			ledState ^= true;
			Thread.Sleep(500);
		}
	}
}

In retrospect I think I made two mistakes:

1. I used the wrong pin. Wanted to use D5 but started with Cpu.PWMChannel.PWM_5 which Intellisense suggests so very helpfully. I still find it confusing that instead I have to use the wrappers (PWMChannels.PWM_PIN_D5, also for the normal pins)
2. I set the ScaleFactor to Milliseconds and used the values above for period and duration.

So, sorry for the smoke, it seems to work now!

Thank you so much,
Jens



#38228 PWM freezes Netduino in 4.2.0.1 Firmware

Posted by daGuy on 30 October 2012 - 01:07 PM in Netduino 2 (and Netduino 1)

Hi, I recently flashed the newest Firmware (4.2.0.1) and want to use PWM to control some motors. Whenever I create a PWM instance though the whole device freezes and stops being recognized by windows (immediately when the new object is created it seems). I have to then erase it (with the gold pad) and reflash the complete firmware to fix it. I am using the correct SDK (MicroFrameworkSDK_NETMF42_QFE2.msi) and SDK as specified in the firmware upgrade post. Has anyone else experienced this and is there a solution? Am I missing something? Thank you for help and hints! Jens



#38140 Netduino 1 Firmware v4.2.0 (update 1)

Posted by daGuy on 28 October 2012 - 07:36 PM in Netduino 2 (and Netduino 1)

Hi, I just updated to this version (4.2.0.1) following all the steps and the Netduino works perfectly...until I try to use the PWM classes. Whenever I create a pwm output the whole Netduino freezes and is not recognized by windows anymore. I have to do a complete erase and flash the firmware again to revive it. Am I missing something important or is there a bug that nobody else seems to have seen so far? Googling didn't bring up any answers for me. Thanks for your help! Jens




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.