over gsm firmware update

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

over gsm firmware update

684 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tbelo on Tue May 26 01:47:01 MST 2015
Hi,
My application uses lpc1115 with gsm module through uart.
I was wondering if I can update the firmware remotely.
i.e
1)Enter the mcu in isp mode through software.
2)dial to the gsm and establish serial connection. eg xmodem
3)upload the new hex code hopefully through flashmagic.

Is there any previous experience or any suggestions ?

Regards


Labels (1)
0 Kudos
8 Replies

643 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tbelo on Thu Sep 03 04:40:58 MST 2015
AN10995 secondary bootloader on the LPC1115 use the following settings:

#define APP_START_SECTOR1
#define APP_END_SECTOR15
#define APP_VALID_CHECK_ADDR0x0000FFFCUL
#define APP_START_ADDR0x00001000UL
#define APP_END_ADDR0x000010000UL
The Bootloader firmware location is at 0 with size 1000
The Application firmware location is at 1000 with size F000

Redirect interrupts:
#define MEMMAP_SETUP 1
#define SYSMEMREMAP_Val 0x00000002

Use int32_t len as the flash is bigger:
uint16_t u16CRC_Calc16(const uint8_t *pu8Data, int32_t i32Len)

Combine the two hex files:
srec_cat bootloader.hex -intel application.hex -intel -o merge.hex -intel
0 Kudos

643 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tbelo on Sat Aug 29 10:51:56 MST 2015
You meant the flash protection mechanism ?
Sorry for the misunderstanding
0 Kudos

643 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LessThanZero on Sat Aug 29 08:17:25 MST 2015

I mistakenly presumed your CRC problem referred to the NXP check word, but this is your own CRC scheme. Sorry, but it doesn't help when you make reference to code you've never posted. The few details you have posted aren't nearly enough to understand what you're talking about. No one here is going to be able to read your mind.

LessThanZero
0 Kudos

643 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tbelo on Fri Aug 28 11:26:40 MST 2015
Hi LessThan Zero,
Regarding to SYSMEMREMAP you open my mind. By using:
#define MEMMAP_SETUP          1
#define SYSMEMREMAP_Val       0x00000002
interrupts works perfect :)

But regarding to memory configuration when I configure the lpc1115 as an lpc1114/301 (like in AN10995), at location 7FFC there are some values and the u32InvalidateApp() function at the secondary application returns to vBootLoader_Task(), Whereas when configuring with the settings as shown before the values at FFFC are all zeroes and the u32InvalidateApp() function doesn't return to bootloader.

Where do you think that my memory settings for the lpc1115 are faulty?

Regards
0 Kudos

643 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LessThanZero on Fri Aug 28 10:01:51 MST 2015

Quote: tbelo

The CRC value (as seen in view memory option of flashmagic) at FFFC is 00000
Application programm executes but interrupt re-direction halts the system.


PS: Using the same settings as of AN10995 on my LPC1115 the CRC has a value :) but still interrupt re-direction doesnt work  :(

1) Can someone evaluate my settings for the LPC1115 ?
2) Any tips for interrupt re-direction ?


I use LPCXpresso v7.9.0_455



The CRC value in effect is that of the secondary bootloader. LPCXpresso calculates this value for you when you flashed the bootloader image. The LPC1115 is never going to evaluate the check word of your firmware, since it doesn't directly boot it.

With regard to interrupt vector table redirection, review the SYSMEMREMAP register in your user manual.

LessThanZero
0 Kudos

643 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tbelo on Fri Aug 28 01:31:51 MST 2015
Based on AN10995 secondary bootloader on the LPC1115 I use the following settings:

#define APP_START_SECTOR1
#define APP_END_SECTOR15
#define APP_VALID_CHECK_ADDR0x0000FFFCUL
#define APP_START_ADDR0x00001000UL
#define APP_END_ADDR0x000010000UL
The Bootloader firmware location is at 0 with size 1000
The Application firmware location is at 1000 with size F000


BUT:
The CRC value (as seen in view memory option of flashmagic) at FFFC is 00000
Application programm executes but interrupt re-direction halts the system.


PS: Using the same settings as of AN10995 on my LPC1115 the CRC has a value :) but still interrupt re-direction doesnt work  :(

1) Can someone evaluate my settings for the LPC1115 ?
2) Any tips for interrupt re-direction ?


I use LPCXpresso v7.9.0_455
0 Kudos

643 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LessThanZero on Wed May 27 21:51:39 MST 2015
It sounds overly complicated to try to use the ISP. The IAP is the programming interface used by the ISP to program/verify/erase flash. The IAP is available for use by your application code, provided your code executes out of SRAM.

You still need to solve the problem how to manage the firmware upload using the GSM/UART. You should manage this such that you have at least a supported page size (e.g. 256, 512, 1024, 4096) before using the Copy RAM to Flash command. The LPC1115 has 8 kB SRAM, so this should be adequate space for your code and a decent sized buffer.

LessThanZero
0 Kudos

643 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tbelo on Wed May 27 15:00:31 MST 2015
Hi,

No one can advice whether my thought can work ?

regards
0 Kudos