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

mIP on Mini


  • Please log in to reply
5 replies to this topic

#1 baxter

baxter

    Advanced Member

  • Members
  • PipPipPip
  • 415 posts

Posted 03 December 2012 - 09:52 PM

I downloaded mip0.3, but when deploying to a Netduino Mini (latest 4.2 firmware) I am having problems. Specifically, in ENC28J60Driver_MC.cs,

A first chance exception of type 'System.ArgumentException' occurred in Microsoft.SPOT.Hardware.dll
An unhandled exception of type 'System.ArgumentException' occurred in Microsoft.SPOT.Hardware.dll
 
 Uncaught exception
at,
public ENC28J60Driver(Cpu.Pin irqPin, Cpu.Pin csPin, SPI.SPI_module spiModule)
{
EXCEPTION --> irq = new InterruptPort(irqPin, true, Port.ResistorMode.PullDown, Port.InterruptMode.InterruptEdgeLevelLow
 
I am using,
 
case InterfaceProfile.NetduinoMini_ENC28:
//GPIO_PIN_5 = 59 and GPIO_PIN_7 = 61 
Start(MacAddress, name, SPI.SPI_module.SPI1, (Cpu.Pin)59, (Cpu.Pin)61); //Interrupt, /CS and Locals reports: irqPin = 59 and csPin = 61. 
I know that the ENC28J60 is hooked up correctly because the the driver posted by hanzibal runs just fine with this pin configuration and produces output such as this,

################################ Program.Main[06/01/2011 00:51:33] --> Received frame data of length 148
 ENC28j60[06/01/2011 00:51:35] --> IRQ occurred
 ENC28j60[06/01/2011 00:51:35] --> IRQ_PKT: frame(s) arrived


mIP0.3 deploys and starts execution with out any errors. Any ideas about what is wrong?

Baxter

#2 NooM

NooM

    Advanced Member

  • Members
  • PipPipPip
  • 490 posts
  • LocationAustria

Posted 03 December 2012 - 10:23 PM

its the pulldown, mini only supports pullup. //edit i also remember someone having problems with edgeLEVEL, maybe just use edge low

#3 baxter

baxter

    Advanced Member

  • Members
  • PipPipPip
  • 415 posts

Posted 04 December 2012 - 01:19 AM

Thanks NooM, Changed Port.ResistorMode to Port.ResistorMode.Disabled and it now compiles and runs with output, Setting IP Address to 192.168.0.40 WARNING! Time out while waiting for Gateway to Respond to ARP request I think I need to check the ENC28J60 datasheet and use an external pullup on the IRQ line, but it is at least a start to getting mIP0.3 to work ... Baxter

#4 NooM

NooM

    Advanced Member

  • Members
  • PipPipPip
  • 490 posts
  • LocationAustria

Posted 04 December 2012 - 02:06 AM

external pulldown you mean. pullup you can do internally, but since its pulldown in code :)

#5 baxter

baxter

    Advanced Member

  • Members
  • PipPipPip
  • 415 posts

Posted 04 December 2012 - 04:11 AM

Yes ... I Also made a stupid mistake. I had the ENC28J60 reset line plugged into the Mini, however, it is not used in the code.
Fixing this, setting a static IP and with your tip, I was able to get the web server example running. Debug output initially shows

Setting IP Address to 192.168.0.40
Link is now up :)
WARNING! Time out while waiting for Gateway to Respond to ARP request
Updating Gateway Mac from ARP
Dropping 0 packet(s)
Packet Count is3: 0
1*** ERXRDPT: 0
1*** ERXWRPT: 210
2*** ERXRDPT: 0
2*** ERXWRPT: 210
Packet Count is4: 0
Packet Count is5: 0

I can ping the Mini with its IP address or its name, "mip". It also shows up in the arp table. Putting http://mip in the
browser brings up the default web page. The ping seems dreadfully slow at 58ms. The ENC datasheet recommends level
shifting 3.3V to 5V between the ENC SO and /INT pins and the MCU which I haven't implemented; a possible cause of the
spurious debug output. This managed TCP/IP Stack is a remarkable achievement by Valkyrie-MT.

Baxter


#6 NooM

NooM

    Advanced Member

  • Members
  • PipPipPip
  • 490 posts
  • LocationAustria

Posted 04 December 2012 - 04:45 PM

thats good news! i also plan to add a enc module to my mini. B)




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.