I have been resurrecting an old NanodeRF board. I made the mistake of trying to flash the board with the latest (3 years old) NanodeRF firmware and Jeelibs libraries from GitHub before I had checked that I had still got the old sources. After I had fixed a few small compilation errrors (mostly cosmetic) everything looked OK. However it refused to work, failing the to get past the ether.begin() call. The Ethercard library was looping waiting for a CLKRDY status from the enc28j60 ethernet chip. The read of the status register was always returning 0. A scope on CS pin (9) of the ethernet chip showed that it was never being pulled down to activate the chip. The culprit turned out to be the call to ether.begin, it was.
if (ether.begin(sizeof Ethernet::buffer, mymac) == 0) { //for use with NanodeRF
It needed to be.
if (ether.begin(sizeof Ethernet::buffer, mymac, 8) == 0) { //for use with NanodeRF
Is it worth me raising a pull request for this on Github?
Does anything else use this code that requires the default CS line (10) to be used?
As far as I know the NanodeRF always has the RFM12 wired to the default SPI SS pin (PB2(SS/OC1B) aka DIG10).
Roger