Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-26 Thread Laurent Gauch
Le 25.02.2013 21:58, Andreas Fritiofson a écrit : On Fri, Feb 22, 2013 at 2:11 PM, Laurent Gauch mailto:laurent.ga...@amontec.com>> wrote: Le 21.02.2013 22 :44, Michael Schwingen a écrit : > On Thu, Feb 21, 2013 at 06:51:13PM +0100, Laurent Gauch wrote: >>> I think we should leave

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-25 Thread Spencer Oliver
On 25/02/13 21:26, Andreas Fritiofson wrote: > > On Mon, Feb 25, 2013 at 10:17 PM, Spencer Oliver > wrote: > > On 25/02/13 20:39, Andreas Fritiofson wrote: > > > On Mon, Feb 25, 2013 at 9:15 PM, Mathias K. >

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-25 Thread Andreas Fritiofson
On Mon, Feb 25, 2013 at 10:17 PM, Spencer Oliver wrote: > On 25/02/13 20:39, Andreas Fritiofson wrote: > >> >> On Mon, Feb 25, 2013 at 9:15 PM, Mathias K. > > wrote: >> >> Hello, >> >> there is a "little" problem in the cortex_m3_soft_reset_halt >> function. T

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-25 Thread Spencer Oliver
On 25/02/13 20:39, Andreas Fritiofson wrote: > > On Mon, Feb 25, 2013 at 9:15 PM, Mathias K. > wrote: > > Hello, > > there is a "little" problem in the cortex_m3_soft_reset_halt > function. The function try to use the > NVIC AIRCR Register to reset the CPU

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-25 Thread Andreas Fritiofson
On Mon, Feb 25, 2013 at 9:15 PM, Mathias K. wrote: > Hello, > > there is a "little" problem in the cortex_m3_soft_reset_halt function. The > function try to use the > NVIC AIRCR Register to reset the CPU. But this CPU has a NVIC but no AIRCR > Register (Page 61 User > manual Rev.1.6) and the memo

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-25 Thread Andreas Fritiofson
On Fri, Feb 22, 2013 at 2:11 PM, Laurent Gauch wrote: > Le 21.02.2013 22:44, Michael Schwingen a écrit : > > On Thu, Feb 21, 2013 at 06:51:13PM +0100, Laurent Gauch wrote: > >>> I think we should leave the signals in a defined, > dongle/layout-specific > >>> state at disconnect, which may be diffe

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-25 Thread Mathias K.
Hello, there is a "little" problem in the cortex_m3_soft_reset_halt function. The function try to use the NVIC AIRCR Register to reset the CPU. But this CPU has a NVIC but no AIRCR Register (Page 61 User manual Rev.1.6) and the memory access finished with a hard fault. To trigger a reset on thi

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-25 Thread Mathias K.
Hello, this happens because the functions assert/deassert reset are magically called two times. The second time every access to mem_ap failed. There is no check if the target is already in reset state and a bug that called this function 2 times. With srst_nogate the reset line is asserted very

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-25 Thread Mathias K.
Hello, i tried: reset_config srst_only srst_pulls_trst but same here: > reset JTAG tap: lpc4350.m4 tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4) JTAG tap: lpc4350.m0 tap/device found: 0x0ba01477 (mfg: 0x23b, part: 0xba01, ver: 0x0) Invalid ACK 0x7 in JTAG-DP transaction in

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-23 Thread Michael Schwingen
On Fri, Feb 22, 2013 at 02:11:32PM +0100, Laurent Gauch wrote: > > Right. However: are you sure *all* dongles out there do it right? > The Amontec JTAGkey and JTAGkey-2 was designed for hot-plugging , > without any glitch on power on etc ... That does not answer my question. > But we know some o

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-22 Thread Peter Stuge
Laurent, Laurent Gauch wrote: > > OpenOCD should do its best to make badly designed dongles work > > as good as possible. > > Badly designed dongles should not be referenced ... bad is bad. I'm sure you understand that your bias completely disqualifies you from saying anything about what OpenOCD

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-22 Thread Laurent Gauch
Le 21.02.2013 22:44, Michael Schwingen a écrit : > On Thu, Feb 21, 2013 at 06:51:13PM +0100, Laurent Gauch wrote: >>> I think we should leave the signals in a defined, dongle/layout-specific >>> state at disconnect, which may be different from what is present at power >>> up. >>> >> If it is differ

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-22 Thread Claudio Lanconelli
It sounds like you hit the SPIFI boot errata, look for the errata datasheet. It should be fixed in new LPC43xx mask, in the meantime NXP suggests to add an hardware watchdog as workaround. Openocd should be aware of the fact that a second reset is needed. I hit the same issue on LPC1850. Cheers,

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-21 Thread Michael Schwingen
On Thu, Feb 21, 2013 at 06:51:13PM +0100, Laurent Gauch wrote: > > I think we should leave the signals in a defined, dongle/layout-specific > > state at disconnect, which may be different from what is present at power > > up. > > > If it is different from power on, it is not a good dongle concept.

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-21 Thread Freddie Chopin
W dniu 2013-02-21 18:05, Spencer Oliver pisze: > can you try with the following reset_config ? > reset_config srst_only srst_nogate connect_assert_srst Nope, that doesn't help... > d:\openocd-dev\openocd-0.7.0-dev-130127142934\bin-x64>openocd-x64-0.7.0-dev-1301 > 27142934.exe -f interface/ftdi/jt

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-21 Thread Laurent Gauch
Le 21.02.2013 17:56, Michael Schwingen a écrit : > On Thu, Feb 21, 2013 at 05:44:39PM +0100, Laurent Gauch wrote: >> This will put the io in tristate ! >> This will work with the Amontec JTAGkey JTAGkey-2 ... since we have >> on-board strong pull-up and use OE_N to control the buffers . >> This cou

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-21 Thread Spencer Oliver
For info just spotted this - https://github.com/mossmann/hackrf/wiki/LPC43xx-Debugging Spen -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: h

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-21 Thread Spencer Oliver
On 21 February 2013 16:28, Freddie Chopin wrote: > W dniu 2013-02-21 16:55, Spencer Oliver pisze: > >> full log with/without srst would be good. >> As before make sure m0 target line is commented out. > > > m0 target was disabled in config. > > log1.txt comes from this command (so it uses sysreset

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-21 Thread Michael Schwingen
On Thu, Feb 21, 2013 at 05:44:39PM +0100, Laurent Gauch wrote: > This will put the io in tristate ! > This will work with the Amontec JTAGkey JTAGkey-2 ... since we have > on-board strong pull-up and use OE_N to control the buffers . > This could be not enough for other dongle / layout without str

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-21 Thread Laurent Gauch
Le 21.02.2013 15:08, Peter Stuge a écrit : > Laurent Gauch wrote: >> I just say ft2232.c has the advantage to include the specific layout. > You clearly do not know the ftdi.c code. Please stop the noise. There > is no advantage here. Move along. Peter, I ever like your comments. Thanks. I know,

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-21 Thread Freddie Chopin
BTW - this board (or this chip) is really strange. It seems to me that it works only every second time it's reset by RESET button... There is some demo software in it that lights up two LEDs after starting. So I connect the power, LEDs are on, I press reset and release it, the LEDs are off, I p

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-21 Thread Spencer Oliver
On 21 February 2013 11:30, Freddie Chopin wrote: > > As you see the "reset" itself is a bit problematic, but it seems to work. > > It seems to me that for this chip it is necessary for OpenOCD to allow it to > run for a while after reset, so that internal bootloader can initialize > external flash

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-21 Thread Michael Schwingen
On Thu, Feb 21, 2013 at 10:11:02AM +0100, Laurent Gauch wrote: > Yes true, both ft2232.c and ftdi.c should tristate the JTAG port at > openocd quit. If openocd drive the pin it must tristate it at the end. > But how you tristate the port could be specific to the layout used. I > just say ft2232.c

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-21 Thread Peter Stuge
Laurent Gauch wrote: > I just say ft2232.c has the advantage to include the specific layout. You clearly do not know the ftdi.c code. Please stop the noise. There is no advantage here. Move along. //Peter -- Everyone ha

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-21 Thread Freddie Chopin
W dniu 2013-02-21 11:46, Spencer Oliver pisze: > The something in very strange as to see that message you would have to > be usng vectreset: > if (reset_config == CORTEX_M3_RESET_VECTRESET) { > LOG_WARNING("Only resetting the Cortex-M3 core, use a > reset-init event " >

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-21 Thread Spencer Oliver
On 21 February 2013 07:29, Freddie Chopin wrote: > > > And now I checked and it REALLY uses sysresetreq... > >> >openocd-x64-0.7.0-dev-130127142934.exe -f >> > interface/ftdi/jtag-lock-pick_tiny_2.cfg -f board/lpc4350_spifi_generic.cfg >> > -c "init; reset init;" >> Open On-Chip Debugger 0.7.0-dev

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-21 Thread Spencer Oliver
On 20 February 2013 22:42, Freddie Chopin wrote: > W dniu 2013-02-20 23:25, Spencer Oliver pisze: > >> On 18/02/13 20:53, Freddie Chopin wrote: > >> For info vectreset and soft_reset_halt should behave similar, other than >> clearing registers. > > > But wouldn't vectreset cause full boot-up proce

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-21 Thread Laurent Gauch
Le 21.02.2013 09:54, Freddie Chopin a écrit : > W dniu 2013-02-21 09:17, Laurent Gauch pisze: >> All the JTAGkey signals + TRST + SRST must be tristated before closing >> the USB device handle, before quiting Openocd. > > I'm not using JTAGkey in the examples above... > >> But this could be layout

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-21 Thread Freddie Chopin
W dniu 2013-02-21 09:17, Laurent Gauch pisze: > All the JTAGkey signals + TRST + SRST must be tristated before closing > the USB device handle, before quiting Openocd. I'm not using JTAGkey in the examples above... > But this could be layout specific, so here the ft2232.c still have his > advanta

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-21 Thread Laurent Gauch
Le 21.02.2013 08:29, Freddie Chopin a écrit : > W dniu 2013-02-20 23:42, Freddie Chopin pisze: When I don't specify any resets (so using sysresetreq), when doing "reset" I get: >> reset >JTAG tap: lpc4350.m4 tap/device found: 0x4ba00477 (mfg: 0x23b, > part: 0xba00, ve

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-20 Thread Freddie Chopin
W dniu 2013-02-20 23:25, Spencer Oliver pisze: > On 18/02/13 20:53, Freddie Chopin wrote: >> So, if I start OpenOCD with reset_config set to "srst_only" when trying >> to do "reset" I get this: >> reset >>> JTAG tap: lpc4350.m4 tap/device found: 0x4ba00477 (mfg: 0x23b, >>> part: 0xba00, ve >

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-20 Thread Freddie Chopin
W dniu 2013-02-20 23:12, Spencer Oliver pisze: > As you mention in a previous mail that you can halt the core the above > seems unlikely. Well, I can, as long as I DON'T try to reset the target with OpenOCD (other than with soft_reset_halt)... After that almost everything fails... I think this b

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-20 Thread Spencer Oliver
On 18/02/13 20:53, Freddie Chopin wrote: > So, if I start OpenOCD with reset_config set to "srst_only" when trying > to do "reset" I get this: > >>> reset >> JTAG tap: lpc4350.m4 tap/device found: 0x4ba00477 (mfg: 0x23b, part: >> 0xba00, ve >> r: 0x4) >> JTAG tap: lpc4350.m0 tap/device found: 0x

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-20 Thread Spencer Oliver
On 20/02/13 20:45, Freddie Chopin wrote: > Noone? (; > > From documentation of LPC43xx and description of the boot process it > may be assumed that these chip briefly disable JTAG during bootup (after > h/w reset), maybe that's why doing hardware reset causes these problems? > >> 5.3.1 Boot proce

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-20 Thread Freddie Chopin
Noone? (; From documentation of LPC43xx and description of the boot process it may be assumed that these chip briefly disable JTAG during bootup (after h/w reset), maybe that's why doing hardware reset causes these problems? > 5.3.1 Boot process > The top level boot process is illustrated in F

Re: [OpenOCD-devel] LPC4330 Xplorer

2013-02-18 Thread Freddie Chopin
So, if I start OpenOCD with reset_config set to "srst_only" when trying to do "reset" I get this: >> reset > JTAG tap: lpc4350.m4 tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, > ve > r: 0x4) > JTAG tap: lpc4350.m0 tap/device found: 0x0ba01477 (mfg: 0x23b, part: 0xba01, > ver > : 0x0)

[OpenOCD-devel] LPC4330 Xplorer

2013-02-18 Thread Freddie Chopin
Hi! I'm fighting with LPC4330 XPLORER board and I can dump and write the SPI flash really fast! The problem is that reset and halt is completely unreliable... The board has the new small JTAG connector, so only SRST, but if I enable it I just cannot reset the chip - no matter what I do I get e