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

cannot attach debugger engine!


Best Answer Chris Walker, 28 January 2013 - 03:53 PM

Hi Graham, The period and duration you are specifying are too long for the PWM peripheral. The maximum period is ~65.5 ms. This is likely causing the time calculation code to get very angry; we'll see if we can make it throw an ArgumentOutOfRangeException in a future release instead. If your board has locked you out, please erase and reflash it using the instructions for the latest firmware (sticky post at the top of this thread). That should get you back up and running. Chris Go to the full post


  • Please log in to reply
4 replies to this topic

#1 Graham.fry

Graham.fry

    Member

  • Members
  • PipPip
  • 15 posts

Posted 28 January 2013 - 11:41 AM

Hi

 

I am new to Netduino or anything like this so please help if I am posting this in the wrong place or anything like that.

 

I am a C# developer and so far have nothing but good things to say about the netdruino and love working with it.

 

Currently I am having a small issue I have a basic blinky working on the netduino plus 2 running version 2.somthing

I then took an RGB Led and got it producing the three primary colours, I then removed all my code and wrote one pwm line of code with all the setup things I needed to do.

 

When I up loaded this nothing happened no lights came on or any thing I then tried to roll back to blinky and I get the error

... cannot attach debugger engine!

 

Error 1 Unable to communicate with device USB:Netduino  

Please help I am going crazy Not being able to play with my netduino.

 

 

The code that broke my favorite toy

 

 

static PWM ledgreen = new PWM(Pins.GPIO_PIN_D6);

const uint period = 3 * 1000 * 1000; // 3 ms

const uint duration = 1 * 1000 * 1000; // 1 ms

 

public static void Main()

{while (true)

{

ledgreen.SetPulse(period, duration);}

}

 

Thanks

 

Graham



#2 Hugo145

Hugo145

    New Member

  • Members
  • Pip
  • 7 posts

Posted 28 January 2013 - 02:25 PM

Hello Graham,

First of all you do not need to SetPulse in a loop - you only need to do it once. But this is surely not the reason why you cannot talk to device no more.

I can advise to check whether Pins.GPIO_PIN_D6 is not the pin that you use for deploy - this possibly could have caused a deadlock (as it was in my case).



#3 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 28 January 2013 - 03:53 PM   Best Answer

Hi Graham, The period and duration you are specifying are too long for the PWM peripheral. The maximum period is ~65.5 ms. This is likely causing the time calculation code to get very angry; we'll see if we can make it throw an ArgumentOutOfRangeException in a future release instead. If your board has locked you out, please erase and reflash it using the instructions for the latest firmware (sticky post at the top of this thread). That should get you back up and running. Chris

#4 Graham.fry

Graham.fry

    Member

  • Members
  • PipPip
  • 15 posts

Posted 29 January 2013 - 06:19 AM

Thanks for the replies

 

I will test this ASAP and get back to let you know if it works



#5 Graham.fry

Graham.fry

    Member

  • Members
  • PipPip
  • 15 posts

Posted 09 February 2013 - 09:21 AM

Hi All thank you for your help after much effort I have managed to flash my netdurino and go it working

 

I think it is something you need to learn when you start

 

Thanks






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.