Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - SergeV

Pages: [1]
1
NXPTM LPC2XXX and LPC17XX / Re: LPC2388 & KSZ8721 10Mbit problem
« on: November 28, 2009, 09:52:34 PM »
Mark, thanks. This helps.
Recently I ordered few more Olimex boards (This time them two are LPC-P2378).
Will continue to investigate the case whenever time permit to.
In the end I brought Ethernet/UDP up and have a lot to do with it leaving any hardware issues in the background.
(but I will. :-)

2
NXPTM LPC2XXX and LPC17XX / Re: LPC2388 & KSZ8721 10Mbit problem
« on: November 18, 2009, 07:15:27 PM »
Hi Mark,
board (I just have my IAR one).
If you happen to play with your LPC2378+IAR could you please look at EMAC registers for me?
Just:
1) upload any project (do not run)
2) set PCONP.PCENET=1 manually
3) look at EMAC registers (open debugger window)
4) report result here.

I need to know if I'm unique having single problem on 2 boards..
Thanks in advance,
Sergei.

3
NXPTM LPC2XXX and LPC17XX / Re: LPC2388 & KSZ8721 10Mbit problem
« on: November 16, 2009, 04:00:41 PM »
- 1) Make sure that the watchdog is disabled when debugging. This may be a general debug problem an not just an Ethernet problem (see http://www.utasker.com/docs/LPC23XX/uTaskerV1.4_LPC2XXX.PDF - page 19).
Good paper.
I do not use LPC2378 watchdog.
What I did:
- uploaded my project to the LPC2378 (did not start it)
- turned EMAC power On manually
- opened Watchdog registers view debugger window
- made few steps forward - all ok. (I see WDMOD = 0 : not using watchdog)
- set break and run -- success.
- opened EMAC registers view window -- hang!
:(

4
NXPTM LPC2XXX and LPC17XX / Re: LPC2388 & KSZ8721 10Mbit problem
« on: November 16, 2009, 02:46:11 PM »
4) The LPC23XX doesn't actually power down peripherals by default and so, if no other code is powering the EMAC down, there shouldn't be any need to power it up.
Nope, I humbly believe this is not true for EMAC.
Yes, most periferals come powered up after hard Reset, but EMAC power PCENET bit of the PCONP is "0" and power is off. Powerdown bit of the POWERDOWN EMAC register... Well, I'm not sure, probably is "0" too ("powered up"), I set it to "0" anyway, but this is of no problem.
5) Have you tried the uTasker project code? This is supported here in detail but not other TCP/IP stacks.
Not yet.
Submitted an application for the code.
(Actually I see the problem independent of the project: I upload any project, then turn EMAC power on manually, then open the EMAC registers page ...  Voila: hang.)
Thanks.

5
NXPTM LPC2XXX and LPC17XX / Re: LPC2388 & KSZ8721 10Mbit problem
« on: November 16, 2009, 02:27:28 PM »
- 2) Are you checking the revision of the chip when configuring Ethernet?
 if (EMAC_MODULE_ID == OLD_MAC_MODULE_ID) ...
Yes I do.
(actually, this has nothing common with my problem since Power has to be On first, any configuration afterwards)
3) Have you tried putting your break point a few lines after you power up the Ethernet controller?  
Yes. And this really helps with my LPC2378-STK board #1 (re-animated one).
On the second board I can set breakpoint, can step down the code, but cannot view EMAC registers.
As soon as I select IAR EMAC registers window Segger J-link debugger hangs (falls into infinite register reading loop). Debugger restart terminates this loop ... sometimes, but not always.

6
NXPTM LPC2XXX and LPC17XX / Re: LPC2388 & KSZ8721 10Mbit problem
« on: November 16, 2009, 12:12:47 PM »
Hi Mark. Great comments. Thanks. (I'll study them carefully a bit later one-by one)
Now I have something to add (on what I did):

1) I replaced LPC2387 on my first Olimex board. This helped! It is working now.
Before it there was 3.3v Power supply shorted: ~2A current drawn. Reset button did not help.
Thus I (hope I) proved that LPC2387 on LPC2387-STK can be killed programmatically.
(This is a second LPC2387 chip replacement on this board and now I'm absolutely sure there was no other reason for chip to die other than long non-stop run. This is a last replacement too because the board is poor quality and will not withstand any more solderings)

2) I did what I asked to do: set a break at MAC power On instruction, did single step + view EMAC registers.
I have had the same error: registers' contents spoiled, debugger hangs, Reset helps!
The difference is that if I break few instructions after MAC power On, I can view regs and debug my code.
Thus I have 2 Olimex LPC2387-STK boards working, having the same problem, but this problem is fatal for EMAC debug on one board only.

3a) (routine job) Added 5Ohm ballast resistors to 3v3 IO power and cut off any 5V signals from the chip (I've found them 5) - in the hope to prevent chip from damage.
3b) (routine job) ordered LPC-P2378 board in the hope there will be no (or less) such a problems I had (have) with LPC2378-STK.

7
NXPTM LPC2XXX and LPC17XX / Re: LPC2388 & KSZ8721 10Mbit problem
« on: November 14, 2009, 01:12:06 PM »
Sorry for this follow-up but I'm really upset. Please help. :'(

Situation (listed above, but more precise):

Hardware: LPC2378STK(USB powered) + J-Link + IAR.
Firmware: Any. (In particular, say uip_webserver or LCD_demo)
After "Project Download and Debug" (Run to main, Hardware reset NXP/LPC)  I
* in the debugger window view Ethernet MAC registers - all OK
* in the debugger "Control block regs" window set PCONP.PCENET=1 manually (switch power On)
* go back to the Ethernet MAC registers registers: spoiled contents (many dashes etc.)
All this I do/see without program start.
Any ideas what could it be? Where to look?
---

What I did:
0) Read LPC2378 datasheet, UM, errata, forums (continue to) .. didn't help yet.

1) if I run uip_webserver it seems to work OK , but if I set a breakpoint there where PCONP.PCENET is set to "1", I see  the same problem. IAR reset (program restart) doesn't help (J-link fail to halt ARM core, etc). Debugger restart helps. Hardware reset button helps too.

2) I measured JTAG signals and LPC2378 power. All seem OK: signals within 3.3v limits, 3v3 and 1v8 power OK and stable.

3) measured 5v board supply current: 250mA, increases to 255mA if I switch EMAC power (make PCENET=1). Not too bad.

4) added 2uF cercap to 1.8V core supply. Nothing changed.

5) wrote this message... HTH
thanks.

8
NXPTM LPC2XXX and LPC17XX / Re: LPC2388 & KSZ8721 problem
« on: November 13, 2009, 06:56:34 AM »
I don't remember any issues with ETHERNET on the Olimex board.
Would you like to have one? I have it for you.

Trying to bring UDP up on raw LPC2378STK (using Windows + IAR + Jlink) I've found that program crashes as soon as EMAC power is switched on. Immediately after power on bit is set to "1" the debugger fails to show MAC registers content and Jlink driver hangs.
However uIP web server sample project worked fine (I can ping 192.168.0.100 and can see web page in a browser) and my first guess was that it was a problem of my code. However when I tried to step through this sample I've found the same problem exactly. The only difference is that when non-stop running the sample it "works", and my program does not.

What else.
This is my second Olimex LPC2378STK. On the first one I learned that problem exists, but ignored it since there was no clear signs about where it is (random rare hangs) and it did not stop the job. Well ..., did not until the LPC2378 controller died. I had nothing to do better than to replace the chip. After then the board worked for maybe a month, then died again and I purchased the second one.

Now I have one LPC2378STK dead and a second one half-live, but with clearly defined problem.
I'll try to study the case. But if somebody here could comment this or will take time to reproduce the problem...

Pages: [1]