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.

onedumbtrucker's Content

There have been 7 items by onedumbtrucker (Search limited from 20-April 23)


By content type

See this member's

Sort by                Order  

#65198 ND3 cannot seem to create an interrupt handler

Posted by onedumbtrucker on 14 June 2016 - 06:56 PM in Netduino 3

OK, finally found the issue.

 

Despite that intellisense wants me to populate "new InterruptPort(Cpu.Pin" it appears the Cpu.Pin types do not work the same as the Pins type.

 

So this works;

button = new InterruptPort(Pins.GPIO_PIN_D1, false, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeLow);

but this does not;

button = new InterruptPort(Cpu.Pin.GPIO_Pin1, false, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeLow);



#65197 ND3 cannot seem to create an interrupt handler

Posted by onedumbtrucker on 14 June 2016 - 05:46 PM in Netduino 3

OK, I found the issue with the exception.

 

This does not work;

new InterruptPort(Cpu.Pin.GPIO_Pin0, false, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeLevelHigh);

But this does;

new InterruptPort(Cpu.Pin.GPIO_Pin0, false, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeHigh);

Notice the different Port.InterruptMode. Not sure what the issue with the InterruptEdgeLevelHigh is.

 

But what I cannot understand is why now the Interrrupt seems to create ok but it still will not trigger. Despite the fact that if I manually read the button I can see the state change.




#65196 "An unhandled exception of type 'System.Exception' occurred in Mi...

Posted by onedumbtrucker on 14 June 2016 - 03:25 PM in Netduino 3

I have the exact same issue with the NetDuino3 Ethernet. Did we get anywhere with this?




#65195 ND3 cannot seem to create an interrupt handler

Posted by onedumbtrucker on 14 June 2016 - 02:43 PM in Netduino 3

Sorry Nevyn, replacing my code with exactly what you suggested still gives the same issue. Even tried a number of little tweaks and changes to your code and still the same result. 

 

It seems like so many of the libraries and methods for ND3 have changed so much that it is really hard to get back to a working project. And there are very few examples for all these new libraries.




#65187 ND3 cannot seem to create an interrupt handler

Posted by onedumbtrucker on 13 June 2016 - 10:22 PM in Netduino 3

Hi All,

 

Having a strange issue again with the ND3.

 

This code worked fine on my ND+ but will not work on my ND3

        public static InterruptPort button = new InterruptPort(Pins.GPIO_PIN_D0, false, Port.ResistorMode.PullDown, Port.InterruptMode.InterruptEdgeLevelHigh);


        public static void Main()
        {
            try
            {
                button.OnInterrupt += new NativeEventHandler(button_OnInterrupt);
            }
            catch (Exception EX)
            {
                Debug.Print(EX.Message.ToString());
            }
..........

public static void button_OnInterrupt(uint data1, uint data2, DateTime time)
        {
..........

 

 

 

When I debug it throws an argument exception for "button.OnInterrupt += new NativeEventHandler(button_OnInterrupt);" every single time. Have tried hundreds of little changes and tweaks and I could swear it actually worked a few times but cannot figure out what I am doing wrong.




#65186 2 projects, 1 works, 1 gives hardware error

Posted by onedumbtrucker on 13 June 2016 - 10:16 PM in Netduino 3

They do.




#65158 2 projects, 1 works, 1 gives hardware error

Posted by onedumbtrucker on 02 June 2016 - 07:06 PM in Netduino 3

Hey all,

 

Wondering if anyone has any ideas about this. I have two different projects, both created for the Netduino3 Ethernet.

 

One is a simple blinking light for testing hardware and I can deploy and run it fine.

 

The other is the actual application I am developing and it worked the first couple times after I created it. (copied source code from an ND+ project). But now for some reason everytime I try to deploy I get the following message.

 

"Error 1 An error has occurred: please check your hardware. "

 
But if I switch over to my blinking light project I can deploy it fine.
 
 
One thing to note, I found I have to use the firmware updater tool to erase the application from the ND3E to switch projects. But that doesn't explain why one works and one doesn't.
 
I may try building the project from scratch again.
 
The only other difference I can see is that I included a reference to System.IO in the project that doesn't work.




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.