Maker Pro
Maker Pro

STM32L + ENC28J60-H(Olimex)

SteAlzzer

Dec 2, 2012
1
Joined
Dec 2, 2012
Messages
1
Hello everybody!
I've got a problem with connecting ENC28J60-H by Olimex to my STM32L-Discovery.
So I write the code, that read an ECON1 register, thatn write some value into it and that read it again. And here is a problem: when i use a debugger step-by-step (F10) each line in this code, everything goes well. But when I set a breakpoint after this lines, register returns me 0x00.
I decided, that ENC just don't have enough time to write values into register. But manual says, that it has its own crystal osillator with frequency 20 or 25 MHz (don't remember exactly). And my frequency is about 150 kHz.
Anyway, I set a Delay (simple counter in the loop) after each SPI-sending or recieving. And that's helped.
Then I go ahead. I write an Init-function (soft-reset, than writing needed values into register), use it in main function. After calling it, I read a ECON1 register again. And I all i got is 0x00 again, even with Delays.
Does anybody know what to do in this situation?
 
Top