[ell-i-developers] Re: ENCX24J600 driver status

  • From: Pekka Nikander <pekka.nikander@xxxxxx>
  • To: ell-i-developers@xxxxxxxxxxxxx
  • Date: Tue, 4 Nov 2014 17:11:47 +0200

Hi Asif,

Yes, you are on the right track.  E_STAT low byte reading is indeed returning a 
zero; I've verified that with SPI protocol analyser.  I suspect there is some 
initialisation problem.  The next step would be to carefully read through what 
we initialise in the registers, and in availablepackets probably read more 
registers to see what is going on.  ALso in receive to analyse the status bits.


On 2014–11–04, at 16:48 , Asif Sardar <engr.asif.sardar@xxxxxxxxxxxxxx> wrote:

> Hi all,
> I have been reading the code for SPI and ENCX24J600 in the 
> feature-runtime-wip.
> To my understanding the ENCX24J600Class::availablePackets() in 
> encx24j600_packet.h is not returning correct packet count value in E_STAT 
> address read through SPI. That may be the only reason why its not reading 
> furthermore packets. Is it possible to test the value returned from lower 
> 8-bits of E_STAT by writing it through serial port? There might be 
> configuration problems while initializing the registers for encx24j600.
> On Thu, Oct 30, 2014 at 12:21 PM, Pekka Nikander <pekka.nikander@xxxxxx> 
> wrote:
> We did some further joint work on the ENCX24J600 driver with Teemu and Otso:
> https://github.com/Ell-i/Runtime/commits/feature-encX24J600-wip
> The current status is as follows:
> 1. The test_ENCX24J600_send test case sends out packets correctly
> 2. The test_ENCX24J600_receive receives one packet, apparently correctly.
> 3. The test_CoAP_no_threads receives one packet, and apparently passes it 
> correctly to ARP, but ARP does not seem  to respond for some reason.
> The current blocking problem is that once the code has received one packet, 
> ENCX24J600.availablePackets no longer reports any more packets.  In an 
> earlier version, before fixing the location where we were reading the packets 
> from, the code did apparently read a packet each and every time there was a 
> packet:
> https://github.com/Ell-i/Runtime/commit/3e58adbfdf2aeecb5e5b9b99c25c8000b8ad3813
> So, somehow the later changes, while fixing the bug of reading wrong data, 
> caused a new bug where any packets beyond the first one are not read any more.
> --Pekka
> -- 
> With Best Regards,
> Asif Sardar.
> +358 43 8265795

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Other related posts: