STM32L + ENC28J60-H(Olimex)

Status
Not open for further replies.

SteAlzzer

Newbie level 2
Joined
Dec 2, 2012
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,299
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?
 

hey, does anybody have some thoughts about it? cause i've tried to do everything that was in my mind: i've changed module (possible deffects), changed microcontroller (cause same thoughts). I've read all errata, again and again. I've increased sysClock up to 16MHz, than reduced it to 4kHz. I've tried some other source code. And nothing helped.
Please, if anybody know what to do else, tell me, because i'm dying here!

By the way, sorry for my english.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…