sample application for ISP over USART/I2C/SPI

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

sample application for ISP over USART/I2C/SPI

1,132 Views
Venkatesh_CH
Contributor I

Is there another sample host application for ISP over USART/I2C/SPI for NXP LPCXpresso54S018

0 Kudos
12 Replies

1,118 Views
Venkatesh_CH
Contributor I

Do we have the tools for loading the flashloader project using any of the serial interface(USART/SPI/I2C) not via SWD or JTAG or USB

0 Kudos

1,028 Views
Venkatesh_CH
Contributor I

Do we have the tools for loading the flashloader project using any of the serial interface(USART/SPI/I2C) not via SWD or JTAG or USB

In the below link which you shared in that flashloader is downloaded using dfu-util(DFU USB boot). But we want the way to download the flashloader using the serial interface(USART/SPI/I2C).

https://community.nxp.com/t5/LPC-Microcontrollers-Knowledge/Use-blhost-to-program-erase-LPC54-S-0xx-...

0 Kudos

1,000 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I have asked the other engineer, If you want to load the flashloader.bin in on-chip RAM in ISP mode, pls refer to the code based on Python and the doc, which enable you load the flashloader.bin to RAM via uart in ISP mode.

 

Hope it can help you

BR

XiangJun Rong

0 Kudos

987 Views
Venkatesh_CH
Contributor I

Thanks for this information. This really helps..
In the python script which you attached, It uses UART serial interface can we use I2C also instead of UART?

Do we have python script for communicating to flashloader instead of blhost? so that we can use i2c here also to communicate with flashloader.

0 Kudos

971 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Unfortunately, we have not the Python script for I2C. The blhost tools is the only tools run on PC which can communicate with the flashloader.

Hope it can help you

BR

XiangJun Rong

0 Kudos

959 Views
Venkatesh_CH
Contributor I

We want to download the Image using another board which is connected to NXP LPC54S018 using I2C Serial interface. So we dont need tools to run it on PC. We want the procedure to be used for ISP I2C.

Am using same sync message which you send in UART over I2C but am not getting response synchronized from NXP LPC54S018

Below are the I2C Pins I used to connect NXP LPC54S018:

PIO0_13 — General-purpose digital input/output pin. Remark: In ISP mode, this pin is set to the Flexcomm 1 I2C SDA function.

PIO0_14 — General-purpose digital input/output pin. Remark: In ISP mode, this pin is set to the Flexcomm 1 I2C SCL function.

These details are mentioned in data-sheet of LPC540xx.pdf.

I tried these four I2C address 0x18, 0x1C, 0x7E and 0x30 and it is not working. Please let me which I2C address are used to communicate with ROM bootloader in I2C ISP?

0 Kudos

934 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

For the 4 I2C slave address of LPC540xx:0x18, 0x1C, 0x30, and 0x38, I suppose anyone is okay.

Foe detailed inf, pls refer to section 6.5.4 I2C ISP mode transaction protocol in UM11060.pdf

In boot mode, the I2C1 is a slave, the host(I2C master) can send the command for example reading the version ID.

Start + slave address+W+ACK +get version command(0xA1)+ACK +repeated Start+slave address+R+ACK +data(version ID)

Hope it can help you

BR

XiangJun Rong

0 Kudos

913 Views
Venkatesh_CH
Contributor I

Thanks a lot .This solves one problem of updating the flashloader to ram using I2C ISP. Once after the flashloader is programmed to RAM... Can you please share the steps for updating the firmware in flash using I2C also. I dont want any applications like blhost.

0 Kudos

897 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

The blhost tools run on PC is the tools which matches with flashloader. But I suppose that you can also use Flashmagic tools run on PC to communicate with flashloader run on LPC.

Hope it can help you

BR

XiangJun Rong

0 Kudos

890 Views
Venkatesh_CH
Contributor I

We want to update the flash using another board connected to NXP LPC54S018 through i2c interface.

We dont want to update using PC tools like blhost and flashmagic tools which runs on PC.

Please share the details of how to flash the image using I2C interface which matches with flashloader?

 

0 Kudos

1,115 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Pls refer to the ticket in community.

Anyway, I suggest you remain the SWD interface on PCB so that you can download/debug.

https://community.nxp.com/t5/LPC-Microcontrollers-Knowledge/Use-blhost-to-program-erase-LPC54-S-0xx-...

 

Hope it can help you

BR

XiangJun Rong

0 Kudos

1,121 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Of course, the LPC54S018 has on-chip bootloader in ROM, you can press the ISP pin during/after Reset, the chip will enter ISP mode, in the ISP mode, You can use flashmagic tools to download code to external spifi flash.

This is flashmagic tools website:

https://www.flashmagictool.com/download.html&d=flashmagic

 

You can load the flashloader project with MCUXpresso tools and download the project to RAM via SWD device, after the flashloader is running, you can write spifi flash with blhost tools run on PC side.

Pls go to the wbsite for the flashloader:

https://www.nxp.com/design/software/development-software/mcuxpresso-software-and-tools-/mcu-bootload...

 

Hope it can help you

BR

XiangJun Rong

 

0 Kudos