Ethernet not working

I have a custom board revision 2, with a P2 which is using a Wiznet 5500 adaptor plugged in to headers to allow for optional connection via wired LAN where Wireless is not possible.

I am trying to understand the changes made to the hardware reset and interrupt pins and whether these impact my board.

I have the test software working on a Photon2 in a Particle ethernet featherwing, also with the same Wiznet 5500 adaptor in a proto feather board, but when in the custom board it is not detecting the Wiznet 5500 adaptor.

Revision 1 of the board had power supply issues to the P2 and so I was not able to test. We have got over those now with a separate auxiliary 3V3 rail for the ethernet adaptor and other peripherals.

I have tried 6.2.0 and 5.9.0 and neither work on custom board. Is this a P2 issue?

Just want to check there is nothing fundamental I am misunderstanding?

The Photon 2 is literally a P2 on a Feather board, with the same platform ID and Device OS.

Did you enable the ethernet detection feature flag? That probably defaults to off on a P2.

How is it connected? The Ethernet pin remapping is only needed if you change the pins from their defaults. You may need to set the reset and interrupt pins. I thought they should use the default by default, but if that's not working you could try setting them.

Exactly P2 and Photon2.

Ethernet detection flag enabled.

Ethernet.isOn() always returns false. Is this supported or not?

Yes, it should work. The next thing will probably be to put a logic analyzer on the SPI bus and make sure it's communicating.

You could also check for logging messages, but because it occurs so early at boot you'll probably not be able to use USB serial and will have to use UART serial and Serial1LogHandler.

The difference between the Photon2 and the P2 on this board is that the Ethernet adaptor is powered off a separate 3V3 rail and I am guessing that the adaptor is getting in an odd state when power is turned on.

I have tried putting the reset line low after Ethernet.on(); is called and before and also tried calling Ethernet.connect(); after the power on and reset - this at least gets an occasional LED flashing green, but never has connected. Mostly though the LED is breathing white. There is power to the ethernet adaptor and the green and orange LEDs on the RJ45 connector are flashing away.

Ethernet detection occurs very early in boot, before your user application starts, because Ethernet needs to run in safe mode in order to do an OTA update over Ethernet. This could also be a factor.

This is also the reason 3V3_AUX power control is implemented the way it is, by settings stored in configuration flash instead of code. It allows the Muon and M.2 breakout board to turn on the power supply to Ethernet after the PMIC has been initialized, but before user firmware boots.

Hi Rick, I hacked the board and connected the ethernet adaptor 3V3 supply to the same line as the P2 - it works. Good to know about that. Last question; Ethernet.isOn() is this supported and working - it doesn't appear in the Device OS reference documents.

Yes, Ethernet.isOn() is supported. I added it to the docs.

Is auxiliary power control supported for P2 per the Muon? Trying to understand if there is a more elegant way to power the ethernet adaptor and turn it off if sleeping?

// Enable 3V3_AUX
SystemPowerConfiguration powerConfig = System.getPowerConfiguration();
powerConfig.auxiliaryPowerControlPin(D7).interruptPin(A7);
System.setPowerConfiguration(powerConfig);

The aux power control pin requires the system power manager, which requires the bq24195 (HAL_PLATFORM_PMIC_BQ24195). Since the P2/Photon 2 don't have the bq24195 PMIC, it's not supported.

Hi Rick, the aim is to create a solution which turns on the power to the Ethernet Adaptor Module
(which is an optional fit) and the aux power supply has an enable line on A1 pin currently but as you have confirmed if enabled from setup() this is too late in the boot for the ethernet enablement. We would like to be able to turn off this power later in a case where the P2 is put into HIBERNATE sleep. If this feature is disabled in Device OS for P2 - that's the way is and we need to come up with an external control - unless you have any other ideas?

It's not clear to me how you'll be able to turn on Ethernet power outside of Device OS, particularly if you need it to work for the cloud connection when in safe mode. If I were starting from scratch I would probably have it default to on and turn it off if not needed.

Ethernet power control during sleep isn't supported on Muon either. It's always left on during sleep. Having a device with wired Ethernet but not external power is a weird case that wasn't a priority to implement.

The solution has been to use a D-type latch circuit with the 3V3_AUX_EN used to clock the latch output. Given the need for a watchdog/RTC IC and a very specific power supply and this power control if using ethernet - the P2 really is much less attractive.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.