Netduino Plus 2 ENC28J60 uses SPI1? But where is MISO?
#1
Posted 01 December 2012 - 09:51 PM
The reason I am asking is because I am adding a profile for NetduinoPlus2 into the new mIP release. Although, I will have to build a firmware with the networking stubbed out or add a disable flag. I suppose I could flash with NetduinoGo firmware... although I suspect the MicroSD won't work with the NGo firmware..?
-Valkyrie-MT
#2
Posted 01 December 2012 - 10:53 PM
Valkyrie-MT,Looking at the schematic, I see the ENC28J60 wires marked with the ENC prefix, but I am very confused. It looks like it is SPI1, but ENC_MISO is connected to PB4? Shouldn't it be PA6_SPI1_MISO?
The reason I am asking is because I am adding a profile for NetduinoPlus2 into the new mIP release. Although, I will have to build a firmware with the networking stubbed out or add a disable flag. I suppose I could flash with NetduinoGo firmware... although I suspect the MicroSD won't work with the NGo firmware..?
-Valkyrie-MT
Here is the Pinout for the NP2 that Gutworks made, maybe it will help. MISO should be D12, but I am not sure that SPI is fully functional at the moment, I think they have a bug that they are working on.
Chuck
Attached Files
#3
Posted 02 December 2012 - 03:19 AM
Here is the Pinout for the NP2 that Gutworks made
Thanks Gutworks. I am asking for the exact wiring of the SPI bus to the ENC28J60 on the PCB of the Netduino Plus 2 itself. I think only Secret Labs will be able to clear this up... Or someone able to view the board file. Which I may try to read myself here soon.
-Valkyrie-MT
#4
Posted 02 December 2012 - 05:41 AM
ENC_MISO is connected to PB4. PA6 and PB4 both have support for SPI1_MISO and by using PB4 for MISO we were able to get PWM on D9...for Arduino shield compatibility.Looking at the schematic, I see the ENC28J60 wires marked with the ENC prefix, but I am very confused. It looks like it is SPI1, but ENC_MISO is connected to PB4? Shouldn't it be PA6_SPI1_MISO?
These STM32 chips are quite a bit more flexible than the SAM7X chips we use on the classic Netduino...but with that flexibility comes a fairly intense pin selection process To the user it should all just work--but it took quite a while to find the best balance of features-on-pins (with the half dozen or more alternate function possibilities on each pin).
Chris
#5
Posted 02 December 2012 - 05:55 AM
ENC_MISO is connected to PB4. PA6 and PB4 both have support for SPI1_MISO
Excellent! Just what I needed to know. So the PA6/SPI1_MISO marking on the diagram for the STM32 chip is merely the default assignment for the SPI1_MISO, which Secret Labs did not use in the N+2. Thanks Chris.
#6
Posted 04 February 2013 - 02:24 PM
Hello,
Could yo give me the connection for the ENC28J60 to STM32F4 discovery board?
Is there any difference in the code for using the STM32F407VG?
#7
Posted 17 April 2014 - 07:44 PM
We were just doing some validation work on Netduino Plus 2 and wanted to make sure that mIP was configured properly. If you have a chance, you'll want to make a quick change to the NetduinoPlus2 profile config in your Networking.cs file.Excellent! Just what I needed to know. So the PA6/SPI1_MISO marking on the diagram for the STM32 chip is merely the default assignment for the SPI1_MISO, which Secret Labs did not use in the N+2. Thanks Chris.
Updated line 273:
Start(MacAddress, name, SPI.SPI_module.SPI2, (Cpu.Pin)4, (Cpu.Pin)40);The SPI bus you want is SPI2 (rather than SPI1): for consistency between Netduinos, we map SPI1 to the D11-D13 pins--so the internal SPI1 is actually "SPI2" from NETMF code's perspective. Also...the chip select pin is PC8 as you noted--which maps to pin # 40 (0x28).
Keep up the great work, and thanks so much for all your contributions.
Chris
#8
Posted 18 April 2014 - 05:09 AM
I just checked in this change. When I retest it on the Netduino Plus 2 myself, I'll assemble a new zip package and probably call it v1.0. I'm usually pretty conservative with the version numbers. I don't want to get expectations too high, but I think after 2 years of extensive use by hundreds of people, I think I can ditch the "Beta" tag .
-Valkyrie-MT
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users