Spi communication problem
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: Spi communication problem
by Zack1 ·
yes i did check all the SPI signals with the Scope.
Am getting all the signals as required.
RE: Spi communication problem
by Zack1 ·
I am getting the version register value as
0x01 on the first try
0x02 on the second and
0x03 on the third.
and 0x04 on the 4rth…
i have read in this forum that sending 0x01 , 0x02, 0x03, is normal behaviour.
but why 0x28 unsted of 0x04.
RE: Spi communication problem
by Zack1 ·
midnightcow,
Really thanks for the help sir,
With that above code the data was not being send for some reason i dont know.
Now i changed the code for transmitting part as mentioned below.
void send_frame
{
Uint16 spi_data[4]={0,};
Uint8 i;
spi_data[0] = 0x00;
spi_data[1] = 0x39;
spi_data[2] = 0x00;
spi_data[3] = 0x00;
GpioDataRegs.GPBCLEAR.bit.GPIO57 = 1; //cs low
for (i=0;i<4;i++)
{
SpiaRegs.SPITXBUF = (spi_data[i]<<8);
}
rdata =SpiaRegs.SPIRXBUF;
GpioDataRegs.GPBSET.bit.GPIO57 = 1; //cs high
}
void spi_init()
{
SpiaRegs.SPICCR.all =0x0007; // Reset on, falling edge, 8-bit char bits
SpiaRegs.SPICTL.all =0x000E; // Enable master mode, normal phase,
// enable talk, and SPI int disabled.
SpiaRegs.SPIBRR =0x001F;
SpiaRegs.SPICCR.all =0x0087; // Relinquish SPI from Reset
SpiaRegs.SPIPRI.bit.FREE = 1; // Set so breakpoints don’t disturb xmission
}
I did probe the spi Bus and the screenshot of the same is attached herewith
RE: Spi communication problem
by Zack1 ·
Am reading the version register correctly now,
But i have some doubt.
I got the the value 0x04 on the 4th read only.
So this happens for every other register?
That this dummy byte of 0x01 0x02 0x03 comes?