Run primary bootloader from user code - PN7462

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

Run primary bootloader from user code - PN7462

Jump to solution
2,317 Views
benten
Contributor II

Hello All,

I need have possibility to upgrade firmware. I read at Quick Start Customer Board about primary downloader. It can be run if I press "DWL_REQ" during reset IC. (I didn't find any other information except how to disabled it permanently)

It is possible to start / request primary downloader from user app/code? It will pass my requirements

Best Regards

Kamil

Tags (2)
1 Solution
2,102 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Kamil,

I am sorry, but so it is not possible to do what you expected, as the ROM boot loader has the activities fixed.

Have a great day,
Kan

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
9 Replies
2,102 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Kamil,

The PN7462 contains 40 kB of on-chip ROM memory. The on-chip ROM contains bootloader, USB mass storage primary download and the following Application Programming Interfaces (APIs). What is your requirement?  Invoking the In-Application Programming (IAP) support for flash from user app/code? Or restart from the ROM and jump into the primary downloader? Please kindly clarify. Thanks for your patience!

Have a great day,
Kan

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
2,102 Views
benten
Contributor II

Hi Kan,

My requirements are not describe how to achieve this.

In my opinion - optimal way it will be "jump to bootloader" without rebooting. Our user app implement CCID protocol. I want to send "escape frame" with "jump to bootloader" command . IC should disconnect CCID usb staff and switch to USB mass storage.

Have a great day,

Kamil

0 Kudos
2,102 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Kamil,

It is possible to jump to bootloader without rebooting, but it still has to check the state of DWL_REQ pin, please refer to the following for details.

pastedImage_1.png

maybe you need an external circuit for help with this action.

Have a great day,
Kan

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
1,998 Views
johannesdev
Contributor III

Hi Kan_Li,

could you please clarify:

  1. How can the primary code downloader (aka USB mass storage) be called from user code? I don't find any API function connected to it.
  2. Can the primary code downloader be called if it was is deactivated to run at boot via phhalSysSer_USB_PrimaryDnldConfig() ?

Thank you and best regards!

0 Kudos
2,102 Views
benten
Contributor II

Hi Kan,

I read this instruction some time ago - but it suggested that: external cirtcut need set dwl_req to HIGH/LOW and reset the PN7462. So I asked it is possible to do without IC (from user app, not external circuit).

Have a great day,

Kamil

0 Kudos
2,103 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Kamil,

I am sorry, but so it is not possible to do what you expected, as the ROM boot loader has the activities fixed.

Have a great day,
Kan

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
2,102 Views
benten
Contributor II

Hi Kan,

I created secondary bootloader...

Thank you.

0 Kudos
1,862 Views
shiv_patil
Contributor II

@benten,

Will you please help me to know, How you have implemented the secondary bootloader to the CCID example code.

0 Kudos
1,852 Views
benten
Contributor II

Dear Shiv,

I write bootloader (with limited memory) which:

a) handle all interrups form NXP (register them in VECTOR_TABLE_NAME)

b) redirect it to main program, for example (i had to compute address of IRQ/Vector table of main program, for example): 

 

 

void RF_IRQHandler(void)
{
	/* Re-direct interrupt, get handler address from application vector table */
	asm volatile("ldr r0, =0x207048");
	asm volatile("ldr r0, [r0]");
	asm volatile("mov pc, r0");
}

 

 

c) in main jump to main program:

 

 

if(is_in_app){
		/* Load main stack pointer with application stack pointer initial value,
		   stored at first location of application area */
		asm volatile("ldr r0, =0x207000");
		asm volatile("ldr r0, [r0]");
		asm volatile("mov sp, r0");

		/* Load program counter with application reset vector address, located at
		   second word of application area. */
		asm volatile("ldr r0, =0x207004");
		asm volatile("ldr r0, [r0]");
		asm volatile("mov pc, r0");
	}

 

 

Main program:

I create interrups in main program normaly

That is all what I rememeber from this project...

0 Kudos