Olimex Support Forum

ARM => JTAG => Topic started by: ottelo on January 10, 2013, 05:21:23 PM

Title: LPC1768 with CooCox = "Can NOT Stop MCU"
Post by: ottelo on January 10, 2013, 05:21:23 PM
Hey I want to use the good and well designed CoIDE Software. I followed your instructions with ARM-USB-TINY-H to set up CoIDE/CoFlash. I can compile the Code (blinky example) but can't download it to my uC. I started the Flash Programmer from CooCox but I cant erase/verify/blankcheck ... because I get always "Can NOt Stop MCU!!".

Sometimes (very rare) the Erase Method works "erase done" ?!

I use this settings:
Olimex-OpenOCD
100KHz
JTAG
VECTRESET or HWRESET or SYSRESETREQ - nothing works

Do I have to insert "wait" commands or "reset_config srst_only" somewhere?
Title: Re: LPC1768 with CooCox = "Can NOT Stop MCU"
Post by: LubOlimex on January 11, 2013, 08:09:32 AM
Hey ottelo,

Did you stumble upon this document: https://www.olimex.com/Products/ARM/JTAG/_resources/How_to_run_CooCox_with_Olimex_JTAGs_v2.pdf (https://www.olimex.com/Products/ARM/JTAG/_resources/How_to_run_CooCox_with_Olimex_JTAGs_v2.pdf)

Best regards,
Lub/OLIMEX
Title: Re: LPC1768 with CooCox = "Can NOT Stop MCU"
Post by: ottelo on January 11, 2013, 11:40:54 AM
Yes ...
Title: Re: LPC1768 with CooCox = "Can NOT Stop MCU"
Post by: LubOlimex on January 11, 2013, 04:47:30 PM
Hmm I tested ARM-USB-TINY-H and our board LPC1766-STK (https://www.olimex.com/Products/ARM/NXP/LPC1766-STK/ (https://www.olimex.com/Products/ARM/NXP/LPC1766-STK/)) with the CoFlash. You can see the settings here:

http://i.imgur.com/jbDea.png (http://i.imgur.com/jbDea.png)
http://i.imgur.com/3QC7P.png (http://i.imgur.com/3QC7P.png)

Can you confirm the same results? I suppose you use the correct FTDI drivers?

Best regards,
Lub/OLIMEX
Title: Re: LPC1768 with CooCox = "Can NOT Stop MCU"
Post by: ottelo on January 11, 2013, 05:56:16 PM
Yes, I use the right driver. I figured out something new:

Now it almost works! With flat cable + plug it doesnt work ? But if I solder the wires direct to the JTAG plug it works nearly always. I have to set the transfer rate to 100 KHz and power off and power on the board to make it work. Now I can debug/transfer .... But sometimes the error message appears "can not stop mcu" so I have to power off the board again. Very strange!!!!


EDIT
Which JTAG Signal/Pin do you connect on your board with the olimex adapter?

This is my connectio
(http://ottelo.funpic.de/jtag_lpc1768.gif)
Title: Re: LPC1768 with CooCox = "Can NOT Stop MCU"
Post by: ottelo on January 12, 2013, 12:52:37 PM
I've found a solution for my problem, maybe the CoCoox developer could integrate this method into Coflash/IDE for LPC1768/Olimex:  8)

1. Power on the lpc1768 Board (own design), jtag cable already plugged in (discovered: length doesnt matter!!!)
2. Hold down the Reset button
3. press a action button (erase/verify/ ...) and wait until error message "can not stop mcu" appears
4. release reset button and press action button again -> works!
5. after this, everything works, until the board is unpowered -> do the method again