We wrote a routine to get the content of registers:
int read_data_WIZ550io (int addr1, int addr2, int contr, int var){
P9OUT &= ~BIT7; //CS WIZ550io → low
while((UCA1IFG&UCTXIFG) ==0); //Wait for TX buffer to be ready for new data
UCA1TXBUF = addr1; //Push address_phase to TX buffer
while((UCA1IFG&UCTXIFG) ==0); //Wait for TX buffer to be ready for new data
UCA1TXBUF = addr2; //Push address_phase to TX buffer
while((UCA1IFG&UCTXIFG) ==0); //Wait for TX buffer to be ready for new data
UCA1TXBUF = contr; //Push control_phase to TX buffer
while((UCA1IFG&UCTXIFG) ==0); //Wait for TX buffer to be ready for new data
UCA1TXBUF = dummy_byte; //Push dummy_byte to TX buffer
while(UCA1STAT & UCBUSY); //Wait until the last byte is completely sent
while(((UCA1IFG&UCRXIFG) && (UCA1IFG&UCTXIFG)) ==0);
__delay_cycles(200);
RX_Buffer[var] = UCA1RXBUF;
P9OUT |= BIT7; //CS WIZ550io -> high
return 0;
}
Now I try to get the last Byte of the IP-Adress from the WizNet550io-Register
read_data_WIZ550io(0x00, 0x12, 0x06, 0x00);
But it did not work. The WIZ550io delivers just 0.
What is wrong?
Best regards
Franz Peter Zantis