Open karimiahmad opened 4 years ago
Supposing that you use the https://github.com/stm32duino/Arduino_Core_STM32 Core,
a quick fix is to edit the Ethernet_STM\src\utility\w5100.cpp
file.
#define STM32_SPI_CS PA4
with #define STM32_SPI2_CS PB12
_STM32F1_
references to SPI.
with SPI2.
in w5100.cpp fileIt did not work. :(
Do you have you the schematic diagram of that board ?
Perhaps PB12 (SCS pin) is not initialized properly. Try to re-initialize it in setup function
void setup() {
pinMode(PB12, OUTPUT); // <<<<------ HERE --------
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
It did not work. :(
I have an w5500 board that used SPI2 of STM32f103c8t6 for communication with W5500 chip. (PB12.PB13.PB14.PB15)
https://wiznetmuseum.com/portfolio-items/stm32f103c8t6-w5500-learning-board/
Please help me. thanks.