Author Topic: lpc1768 Ethernet not working without jlink debugger attach to it why?  (Read 3185 times)

0 Members and 6 Guests are viewing this topic.

Offline navidrctTopic starter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: 00
hi
i use lpc1768 Ethernet and when jlink debugger is attach to it it work fine and i can send socket and rcv socket .
but when i deathwatch the debugger Ethernet wont work .
in the link below someone had my problem
https://www.lpcware.com/content/forum/software-runs-some-peripherals-doesnt-when-target-started-without-jtagswd

i dont get it why debuger is so important
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4179
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: lpc1768 Ethernet not working without jlink debugger attach to it why?
« Reply #1 on: March 16, 2017, 02:31:03 pm »
This is often something with timing. Somewhere you're missed an little * in the manual and you're not waiting long enough for some bit to clear or operation to complete.
Sometimes it can even be the data buffer between a fast and slow part.

Or look into your debugger options to see what it turns on inside the chip. Maybe you're using one of these features, which aren't enabled without debugger.
 
The following users thanked this post: navidrct

Offline senso

  • Frequent Contributor
  • **
  • Posts: 951
  • Country: pt
    • My AVR tutorials
Re: lpc1768 Ethernet not working without jlink debugger attach to it why?
« Reply #2 on: March 16, 2017, 03:21:28 pm »
Weak power supply?
 
The following users thanked this post: navidrct

Offline Brutte

  • Frequent Contributor
  • **
  • Posts: 614
Re: lpc1768 Ethernet not working without jlink debugger attach to it why?
« Reply #3 on: March 24, 2017, 06:54:59 pm »
"Attached debugger" is vague.

It may be that it is a powering issue and it is powering the target somehow. You should diagnose that quite easily.
It may be that your nreset is floating and a debugger pulls it up. Another easy to diagnose, embedded 0b101.
Then there may be some software problems. LPC1769 comes from power up with slow RC clocking but a debugger can spin it up to something faster, like external quartz + PLL. No debugger - no spinning up. Make sure you run PLL config at startup.
And the final idea - binary made for debugging would most likely not work without "debugger attached". So you cannot disconnect a debugger, reset target and enjoy running a binary on Cortex chips. That is because most likely binary made for debugging is linked against semihosted libc. Such libc uses asm("bkpt") which makes cortex core hardfault.
 
The following users thanked this post: navidrct

Offline navidrctTopic starter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: 00
Re: lpc1768 Ethernet not working without jlink debugger attach to it why?
« Reply #4 on: August 07, 2017, 11:26:23 am »
This is often something with timing. Somewhere you're missed an little * in the manual and you're not waiting long enough for some bit to clear or operation to complete.
Sometimes it can even be the data buffer between a fast and slow part.

Or look into your debugger options to see what it turns on inside the chip. Maybe you're using one of these features, which aren't enabled without debugger.
i fixed it with delay  |O
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4179
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: lpc1768 Ethernet not working without jlink debugger attach to it why?
« Reply #5 on: August 07, 2017, 01:05:20 pm »
It only took 5 months.  :phew:
 
The following users thanked this post: navidrct

Offline alm

  • Super Contributor
  • ***
  • Posts: 2903
  • Country: 00
Re: lpc1768 Ethernet not working without jlink debugger attach to it why?
« Reply #6 on: August 07, 2017, 01:09:29 pm »
i fixed it with delay  |O
A delay where? For any future person running into the same problem.
 
The following users thanked this post: navidrct

Offline navidrctTopic starter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: 00
Re: lpc1768 Ethernet not working without jlink debugger attach to it why?
« Reply #7 on: August 08, 2017, 08:52:49 am »
It only took 5 months.  :phew:
:-DD :-DD :-DD :-DD :-DD
i fixed it right after posting last post on this thread but i forgot to say it here
 

Offline navidrctTopic starter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: 00
Re: lpc1768 Ethernet not working without jlink debugger attach to it why?
« Reply #8 on: August 08, 2017, 08:54:18 am »
i fixed it with delay  |O
A delay where? For any future person running into the same problem.
apparently it take time for DP83848CVV to boot up and work perfectly so before net init function i add delay to let DP83848CVV too boot up and then init connection with it
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6572
  • Country: nl
Re: lpc1768 Ethernet not working without jlink debugger attach to it why?
« Reply #9 on: August 08, 2017, 11:38:18 am »
That is the PHY chip right?
You probably know this but I will say it anyway for youngplayers, you should not add just some delay till it works.
That is asking for problems, many of these chips have a boot up delay time that is depending on the network configuration where they are attached, time for DHCP etc. etc.
The right way of doing is this is polling the PHY chip to check if it is boot and up and running and then continue otherwise it might work fine at your home but not with all of your customers networks and you get complaints and returns.
 
The following users thanked this post: navidrct

Offline alm

  • Super Contributor
  • ***
  • Posts: 2903
  • Country: 00
Re: lpc1768 Ethernet not working without jlink debugger attach to it why?
« Reply #10 on: August 08, 2017, 12:00:58 pm »
Agreed. I would only use a delay if it is specified in the datasheet or if there was no other solution. In general polling the status until it is ready is the more robust solution.
 
The following users thanked this post: navidrct

Offline navidrctTopic starter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: 00
Re: lpc1768 Ethernet not working without jlink debugger attach to it why?
« Reply #11 on: August 09, 2017, 05:08:28 am »
That is the PHY chip right?
You probably know this but I will say it anyway for youngplayers, you should not add just some delay till it works.
That is asking for problems, many of these chips have a boot up delay time that is depending on the network configuration where they are attached, time for DHCP etc. etc.
The right way of doing is this is polling the PHY chip to check if it is boot and up and running and then continue otherwise it might work fine at your home but not with all of your customers networks and you get complaints and returns.
thank you for telling me that
i think i need dig in datasheet deeper to find solution for that
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf