Help needed SPI / ETHClick board

General discussion on mikroElektronika development boards.
Post Reply
Author
Message
GraemeCaUK
Posts: 13
Joined: 04 Mar 2010 19:21

Help needed SPI / ETHClick board

#1 Post by GraemeCaUK » 04 Apr 2022 10:32

Hi,

I'm trying to use a MikroElectronica ETH Click board in conjunction with a Microchip SAMD21 Xplained development board. I'm building the project using Microchip Studio and everything builds and executes, but when the software reads PHSTAT2.LSTAT from the ENC28J60 on the ETHClick module, it is always returning 0 signifying no link. I've tried two separate ETHClick boards with the same effect, so it's not a faulty module.

I'm using a crossover CAT5 to connect directly to the ethernet port on my laptop. I've verified that the cable is ok because I can use it to successfully communicate between my test PC and another laptop.

I've stepped through the SAMD21 code using a debugger and I am definitely trying to read both bytes of PHSTAT2.

At the moment my best theory is that my SPI is configured incorrectly. I've attached a screenshot of the SPI settings I'm using. I've checked and rechecked the pin mappings for SCK, MISO, MOSI & CS and they are definitely appropriate for the development board I am using.

The other SPI settings I've configured in Microchip Studio are:

Driver: HAL SPI Master
Character size : 8 bit
Baud: 10000000


I'm assuming these are wrong. I'd be very grateful if anyone could confirm what I should be using, or provide other suggestions as to why PHSTAT2.LSTAT might be constantly reading zero.

Many thanks in advance for any help you can offer

Graeme.

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Help needed SPI / ETHClick board

#2 Post by filip » 08 Apr 2022 10:06

Hi,

I believe I have answered you on the HelpDesk regarding this issue.

Regards,
Filip.

Post Reply

Return to “Development Boards”