Hi everyone,
I am currently working on a project where I am interfacing two ENC28J60 Ethernet modules with an STM32 Blue Pill board using the EthernetENC library. While both modules work individually, I can't seem to get them to function simultaneously in my code.
Setup:
-
Microcontroller: STM32F103C8T6 (Blue Pill)
-
Ethernet Modules: Two ENC28J60
-
Library: EthernetENC (for ENC28J60 control)
-
SPI Configuration: Both modules on SPI1 but with separate CS pins (PA4 for Module 1 and PB12 for Module 2)
-
Firmware: Using the Arduino STM32 Core (STM32duino) for programming
Issue:
- Both ENC28J60 modules work fine individually when I initialize and communicate with them one at a time.
-
However, when I attempt to use both modules in the same sketch, only one module responds. The other seems unresponsive, even with separate CS lines and static IP assignments.
-
I suspect the issue could be related to the handling of SPI communication in the EthernetENC library or how the library handles multiple ENC28J60 modules on the same SPI bus.
Firmware-side Steps Taken:
* Assigned static IP addresses for both modules.
-
Ensured separate chip-select (CS) pins for both modules.
-
Verified that each module works individually in the same setup.
-
Modified the sketch to switch between modules, but they don’t work together in one execution.
Question:
-
Could this be a limitation in the EthernetENC library when managing multiple ENC28J60 modules?
-
Are there any recommended changes in the firmware or alternative libraries to better handle two ENC28J60 modules on the same SPI interface?
-
Any guidance on how to ensure both modules work simultaneously with the STM32 and Arduino framework?
Looking forward to any help or suggestions from those who’ve had similar experience or knowledge of the EthernetENC library’s multi-module support.
Thanks in advance!