I send/receive UDP packets. But a lot of packets lost. So while debugging my program I found out that I read the wrong pointer.
So I do the test
//WRITE ptr = 8; IINCHIP_WRITE(Sn_RX_RD0(s),(uint8)((ptr & 0xff00) >> 8)); IINCHIP_WRITE((Sn_RX_RD0(s) + 1),(uint8)(ptr & 0x00ff)); //READ ptr = IINCHIP_READ(Sn_RX_RD0(s)); ptr = ((ptr & 0x00ff) << 8) + IINCHIP_READ(Sn_RX_RD0(s) + 1); //at this point ptr = 0 !!!
So I write a predefined value to Sn_RX_RD0 and read it back and get a wrong value. At this poin i even don’t know if it’s written properly.