LPC 1768 Serial Bootloader(UART)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC 1768 Serial Bootloader(UART)

6,943 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by reedomneck on Mon May 16 23:08:59 MST 2016
Hi,

I am new to this LPC series controller, i got some reference bootloader codes for updating code through SPI and I2C, but for my project it should update code through serial interface(UART).
I have gone throgh the forum but i didn't get any info.
Does this controller has inbuilt bootloder code for UART update?

Can anyone please help me on this.

Regards,
--Dom
Labels (1)
11 Replies

4,511 Views
lpcware
NXP Employee
NXP Employee
bump
0 Kudos
Reply

4,511 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by reedomneck on Wed May 18 02:03:59 MST 2016
Hi,

In this link http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/lpc-cortex-m-mcus/lpc-cor...

I have come across all the project, i din't get any idea .
I feel In-Application Programming for the LPC1700 project is the one UART bootloader
0 Kudos
Reply

4,511 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by reedomneck on Tue May 17 05:08:59 MST 2016
Thank you very much for sharing the link.
In-Application Programming for the LPC1700 is the one has serial bootloader application but how its jumping to the user application .

For TeraTerm Pro which file format we need to select for transferring?

--Dom
0 Kudos
Reply

4,511 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue May 17 03:38:07 MST 2016
Google  :quest:

http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/lpc-cortex-m-mcus/lpc-cor...
0 Kudos
Reply

4,511 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by reedomneck on Tue May 17 03:15:40 MST 2016
I found sample project for SPI secondary boot loader and I2C secondary boot loader, similar to this is there any sample project for UART base.

Regards
--Dom
0 Kudos
Reply

4,511 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue May 17 02:21:55 MST 2016

Quote: reedomneck
Does this controller has inbuilt bootloder code for UART update?



Yes, boot into ISP as described here:

https://www.lpcware.com/content/faq/lpcxpresso/regaining-debug-access

and then use Flash Magic

http://www.flashmagictool.com/

to flash your chip. That's all  :) 
0 Kudos
Reply

4,511 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vtw.433e on Tue May 17 01:43:45 MST 2016
You can put your own boot loader in flash and this will run by default. The built in boot loader is in ROM, and it can always be reactivated via the ISP pin, which is described in the UM (this is a recovery mode).
0 Kudos
Reply

4,511 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by reedomneck on Tue May 17 01:33:43 MST 2016
Thanks for reply.

Shared code looks like its for front end where you select the binary file to flash.
But i need info on whether this controller has inbuilt serial bootloader.

0 Kudos
Reply

4,511 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by reedomneck on Tue May 17 01:23:20 MST 2016
Thanks for reply.

So this controller has inbuilt serial bootloader code and its called as ISP.

Can we overwrite this serial bootloader code with our own bootloader.

Regards,
--Dom
0 Kudos
Reply

4,511 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sukrubahadir on Tue May 17 00:48:01 MST 2016
I am working on it. I am using LPC1769.
I am writing my code on C#. I have some problem, I share my code here, but there is a problem. I can not receive return codes from lpc1769.
Maybe my code will help you and maybe someone help me about return codes.

Synchronization part of code :

 public SynchronizationState Synchronize_With_LPC1769()
        {
            bool isResponseOk = false;

            try
            {

                // Default setting for echo mode is on...

                // First part of synchronization...
                IspSerialPort.Write("?");
                System.Threading.Thread.Sleep(10);

                isResponseOk = EvaluateResponse("Synchronized");
                if (isResponseOk != true)
                    return SynchronizationState.NotSync;

                // Second part of synchronization...
                IspSerialPort.Write("Synchronized\r\n");
                System.Threading.Thread.Sleep(10);

                isResponseOk = EvaluateResponse("Synchronized\rOK"); 
                if (isResponseOk != true)
                    return SynchronizationState.NotSync;

                // Third part of the synchronization...
                IspSerialPort.Write("14748\r\n");
                System.Threading.Thread.Sleep(10);

                isResponseOk = EvaluateResponse("14748\rOK");
                if (isResponseOk != true)
                    return SynchronizationState.NotSync;


                return SynchronizationState.Sync;

            }
            catch (Exception ex)
            {
                return SynchronizationState.NotSync;
            }
        }


unlock command :

public void Unlock()
        {
            if (IspSerialPort.IsOpen)
            {

                string UnlockCommand = "U 23210 <CR><LF>";

                try
                {
                    IspSerialPort.Write(UnlockCommand);
                    System.Threading.Thread.Sleep(10);

                    if(IspSerialPort.BytesToRead > 0)
                    {
                        char[] Response = new char[IspSerialPort.BytesToRead];
                        IspSerialPort.Read(Response, 0, IspSerialPort.BytesToRead);
                        // TODO : evaluate return value ltf .........
                    }
                }
                catch (Exception)
                {
                    SerialPortExceptionOccur = true;
                }
            }
            
        }


when I send unlock command, I just receive command name. But I can not receive return codes.


0 Kudos
Reply

4,511 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vtw.433e on Tue May 17 00:41:29 MST 2016
It is called ISP and is documented in the user manual.