November 24, 2024, 02:37:48 PM

LPC1768 with CooCox = "Can NOT Stop MCU"

Started by ottelo, January 10, 2013, 05:21:23 PM

Previous topic - Next topic

ottelo

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?

LubOlimex

Technical support and documentation manager at Olimex


LubOlimex

Hmm I tested ARM-USB-TINY-H and our board 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/3QC7P.png

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

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

ottelo

#4
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

ottelo

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