EtherEncLib icon indicating copy to clipboard operation
EtherEncLib copied to clipboard

unstable See Rev. B7 Silicon Errata issues 12 and 13

Open lutzha opened this issue 9 years ago • 2 comments

// Reset the transmit logic problem. See Rev. B7 Silicon Errata issues 12 and 13 writeOp(ENC28J60_BIT_FIELD_SET, ECON1, ECON1_TXRST); writeOp(ENC28J60_BIT_FIELD_CLR, ECON1, ECON1_TXRST); writeOp(ENC28J60_BIT_FIELD_CLR, EIR, EIR_TXERIF | EIR_TXIF); // send the contents of the transmit buffer onto the network writeOp(ENC28J60_BIT_FIELD_SET, ECON1, ECON1_TXRTS); // wait for transmission to complete or fail { unsigned long timer = millis(); while (((eir = readReg(EIR)) & (EIR_TXIF | EIR_TXERIF)) == 0) { if (millis() - timer > 1000) { /* Transmit hardware probably hung, try again later. / / Shouldn't happen according to errata 12 and 13. */ writeOp(ENC28J60_BIT_FIELD_CLR, ECON1, ECON1_TXRTS); return false; } } } writeOp(ENC28J60_BIT_FIELD_CLR, ECON1, ECON1_TXRTS);

lutzha avatar Sep 17 '15 17:09 lutzha

Hi! Nice info! I am freeing some time here to finish the lib enhancements...

That reset transmit logic always troubled me. Thanks for the help! Nice code! Are you using it that way?

Is This code solve colision packet problem?

Thank you for your contribution! Renato Aloi

renatoaloi avatar Sep 17 '15 18:09 renatoaloi

i take it from microchip forum, it works after little changes. now stable since 4h ;)

lutzha avatar Sep 18 '15 11:09 lutzha