lpc1768 Ethernet not working without jlink debugger attach to it why? - Page 1
Forum section: electronics / general

author: navidrct
author_rank: Regular Contributor
timestamp: March 12, 2017, 12:27:55 pm
content: hii 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 problemhttps://www.lpcware.com/content/forum/software-runs-some-peripherals-doesnt-when-target-started-without-jtagswdi dont get it why debuger is so important

author: Jeroen3
author_rank: Super Contributor
timestamp: March 16, 2017, 02:31:03 pm
content: 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.

author: senso
author_rank: Frequent Contributor
timestamp: March 16, 2017, 03:21:28 pm
content: Weak power supply?

author: Brutte
author_rank: Frequent Contributor
timestamp: March 24, 2017, 06:54:59 pm
content: "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.

author: navidrct
author_rank: Regular Contributor
timestamp: August 07, 2017, 11:26:23 am
content: Quote from: Jeroen3 on March 16, 2017, 02:31:03 pmi fixed it with delay

author: Jeroen3
author_rank: Super Contributor
timestamp: August 07, 2017, 01:05:20 pm
content: It only took 5 months.

author: alm
author_rank: Super Contributor
timestamp: August 07, 2017, 01:09:29 pm
content: Quote from: navidrct on August 07, 2017, 11:26:23 amA delay where? For any future person running into the same problem.

author: navidrct
author_rank: Regular Contributor
timestamp: August 08, 2017, 08:52:49 am
content: Quote from: Jeroen3 on August 07, 2017, 01:05:20 pmi fixed it right after posting last post on this thread but i forgot to say it here

author: navidrct
author_rank: Regular Contributor
timestamp: August 08, 2017, 08:54:18 am
content: Quote from: alm on August 07, 2017, 01:09:29 pmapparently 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

author: Kjelt
author_rank: Super Contributor
timestamp: August 08, 2017, 11:38:18 am
content: 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.

author: alm
author_rank: Super Contributor
timestamp: August 08, 2017, 12:00:58 pm
content: 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.

author: navidrct
author_rank: Regular Contributor
timestamp: August 09, 2017, 05:08:28 am
content: Quote from: Kjelt on August 08, 2017, 11:38:18 amthank you for telling me thati think i need dig in datasheet deeper to find solution for that