cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F105RBT6 Spi read wrong data.

vivek
Associate II

I am configure w5100 using spi.but at the time of reading its show wrong data.

Refer Code link: https://www.carminenoviello.com/2015/08/28/adding-ethernet-connectivity-stm32-nucleo/

4 REPLIES 4
dbgarasiya
Senior II

have you done right pin configuration

dbgarasiya
Senior II

if your pin configuration is right then delay could be the reason

GPIO_InitTypeDef GPIO_InitStructure;

RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);

GPIO_InitStructure.GPIO_Pin=ETH_SCK | ETH_MOSI | ETH_MISO ; 

GPIO_InitStructure.GPIO_Mode=GPIO_Mode_AF_PP;

GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;

GPIO_Init(GPIOB, &GPIO_InitStructure);  

GPIO_InitStructure.GPIO_Pin=ETH_SS; 

GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;

GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;

GPIO_Init(GPIOB, &GPIO_InitStructure); 

yes but at the starting time for setting and getting ip return from w5100 showing wrong data.