Software runs but some peripherals doesn't when target started without JTAG/SWD.

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by rody on Wed Sep 09 01:23:58 MST 2015
The software runs without problems when JTAG/SWD. It continues to run without problems when the JTAG/SWD is disconnected, by disconnecting the JTAG/SWD connector. It has problems when the JTAG/SWD is disconnected and the target is powered off and on.

So far i understand is sets lpcexpresso the target to SWD by default when starting with debugging. Apparently when this is done the software runs and if not it runs with problems. 

The software uses Freertos, lwip (1.4.1) and lpcopen. Heap_5 is used and a HeapRegions are mapped in AHB and standard memory. (2 regions).
The standard sysinit.c and startup files are used.
The software has two parts:
- lpc_chip_175x_6c (lib)
- application

As far I can see for now, the ADC on [u]DMA [/u] and ethernet is not working. Init problem with AHB memory? I tried several setup's...

The ADC is in burst mode and generates an interrupt if ADC7 is sampled. Then a DMA transfer is started to copy the DAC data to an array in AHB memory. The DMA interrupt  is never executed. To debug this I write a '#' to the UART.

The PBUF's etc used for ethernet is also placed in AHB  memory.

The software does not use semihosting, the libraries are not linked. We use Redlib(nohost), DEBUGOUT macro's are not used. We use our own printf what formats the data to a ringbuffer. This ringbuffer is send to the uart. The uart  runs on interrupt.

The JTAG hardware pins are pulled up and down accordingly to: https://www.lpcware.com/content/faq/lpcxpresso/debug-design