capiman / lpc21isp

lpc21isp - Portable command line ISP for Philips LPC family and Analog Devices ADUC70xx
68 stars 57 forks source link

LPC15xx support #26

Open Moomeanus opened 3 years ago

Moomeanus commented 3 years ago

Extensively verified and tested with LPC1519 & LPC1549 variants.

Signed-off-by: Stefan Szczygielski github@asio.pl

dmitryf7 commented 8 months ago

This code does not work with LPC1549.

Moomeanus commented 8 months ago

Could you be more specific? AFAIK lpc21isp returns failure or something on exit and doesn't jump-start the code but the programming itself works correctly.

dmitryf7 commented 8 months ago

lpc21prog_ss

  1. Build with MSVS 2022 32bit -> "make -f Makefile.vc"
  2. Observe screenshot. Writing freezes of 1st sector and then program exit.

I'm using USB to UART converter based on FTDI chip.

Moomeanus commented 8 months ago

I guess you are not running your MCU at a frequency of 12 kHz (12 000 Hz) but probably at 12 MHz (12 000 000 Hz). The command line should read:

lpc21isp.exe (...) 115200 12000000

This influences the internal programming delays and such (AFAIR it is being passed to programming firmware routines in ROM firmware), might make it work.

dmitryf7 commented 7 months ago

I guess you are not running your MCU at a frequency of 12 kHz (12 000 Hz) but probably at 12 MHz (12 000 000 Hz). The command line should read:

lpc21isp.exe (...) 115200 12000000

This influences the internal programming delays and such (AFAIR it is being passed to programming firmware routines in ROM firmware), might make it work.

The LPC15xx use internal 12MHz RC oscillator for ISP. External XTAL/Generator does not affect the ISP process. (LPC15XX User Manual 34.4 "UART communication protocol")

Moomeanus commented 7 months ago

Still, you need to pass 12000000 (and not 12000) as operating frequency to lpc21isp.

dmitryf7 commented 7 months ago

According the lpc21isp description (when run the tool with no parameters) oscillator frequency should be set in kHz

image