I have made some small progress with the overflowing buffer. This
seems to work if you use this procedure with a push button. I'll work
it into the library when I get a chance. I am also having trouble with
arp, I'll have to fix it as well.
procedure enc_reset_rx_buffer() is
-- stop receiving packets
enc_set_bank(ECON1)
enc_spi_write_command(ENC28J60_BIT_CLEAR, ECON1, ECON1_RXEN)
-- setup receive buffer at 0
-- set receive buffer start address to 0
enc_write_register(ERXSTL, 0)
enc_write_register(ERXSTH, 0)
-- set receive pointer address
enc_write_register(ERXRDPTL, 0)
enc_write_register(ERXRDPTH, 0)
-- set rx buffer end address
enc_write_register(ERXNDL, RXSTOP_INIT_L)
enc_write_register(ERXNDH, RXSTOP_INIT_H)
enc_packet_pointer = 0
enc_set_bank(ECON1)
enc_write_register(EPKTCNT,0) -- set no packets available
while enc_read_register(EPKTCNT) != 0 loop
enc_spi_write_command(ENC28J60_BIT_SET, ECON2, ECON2_PKTDEC) --
decrement packet count by 1 (EPKTCNT)
end loop
debug_crlf(DEBUG_2)
const byte str1[] = "BUFFER OVERFLOW - Buffer has been cleared!"
debug_string(1,str1)
debug_crlf(DEBUG_2)
enc_spi_write_command(ENC28J60_BIT_SET, ECON1, ECON1_RXEN)
end procedure
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en.