cancel
Showing results for 
Search instead for 
Did you mean: 

SPI Problem on W5500 With STM32G474RE

Kirtan
Visitor

Hello,

I am attempting to send data from an STM32G474RE (Client) to a laptop (Server) over TCP using the W5500 module. However, I am encountering an issue where the data transmission works properly only up to an SPI baud rate of 18 MHz. When I attempt to increase the SPI baud rate beyond 18 MHz, the transmission fails, and no data is sent to the server.

I have also tried using DMA mode for SPI, but there was no improvement in the situation.

According to the W5500 datasheet, the recommended practical SPI baud rate is 33.3 MHz. Despite this, I am unable to send data reliably at higher speeds.

Can Anyone suggest a solution to resolve this issue and allow for successful data transmission at SPI speeds above 18 MHz?



12 REPLIES 12

Apologies for the previous confusion. Here's a clearer description of my setup:

IMU(On-CAN) -> STM32(Client)-> (SPI) W5500 module (Ethernet) -> Laptop(Server) (Deserialize the IMU Data).


The data flow in the system follows this path: The IMU sensor sends data via the CAN bus to the STM32 microcontroller, which acts as the client in this setup. The STM32 then communicates with the W5500 Ethernet module over SPI to transmit the IMU data. The W5500 module handles the Ethernet communication, sending the data to a laptop, which serves as the server. The laptop then deserializes the IMU data for further processing or analysis. This setup allows the STM32 to capture sensor data and send it over a network to the laptop for real-time monitoring and interpretation.

The system works correctly with an SPI baud rate up to 18 MHz (equivalent to(72 MHz-Clock/4 prescaler) 18 Mbps in STM32). However, if I increase the SPI baud rate beyond 18 MHz, data transmission from the STM32 to the laptop stops. I am aiming for higher throughput and lower latency, so I want toto achieve this by increasing the SPI speed in STM32.


@Kirtan wrote:

if I increase the SPI baud rate beyond 18 MHz, data transmission from the STM32 to the laptop stops.


So you need to determine if that's because:

  1. SPI communication between the STM32 and the WS5500 stops
  2. Ethernet communication between the WS5500 and the laptop stop
  3. other

You still haven't given details of the connection between STM32 and WS5500

> Apologies for not mentioning earlier that I am using the Nucleo STM32G474RE, rather than a custom board.

Jumper wires between the nucleo and a breakout board are unlikely to support 18 MHz reliably, let alone higher.

If you feel a post has answered your question, please click "Accept as Solution".