Enter ISP mode with software on i.MX RT1176

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

Enter ISP mode with software on i.MX RT1176

Jump to solution
2,204 Views
D_TTSA
Contributor V

Good day

How do I make the RT1176 enter ISP mode using code?

I want to do In-Application Programming (IAP), but I can't find any information on this.

The IMXRT1170RM mentions IAP briefly, but provides no explanation for how this can be done:

D_Tram23_0-1634902655925.png

Kind regards

Damon McLoughlin

Tags (2)
0 Kudos
1 Solution
2,139 Views
D_TTSA
Contributor V

Hi @jeremyzhou 

I found the problem I was having. I was passing the value (BOOTLDR_CONF_ARG -> 0xeb100000) as a pointer, instead of passing a pointer to a variable containing this value (&arg).

This allows me to enter ISP mode in the FreeRTOS example too (you showed the Baremetal Hello World example).

For future readers, note that you need to use arg = 0xeb100000 if you would like to have the option of connecting with UART or USB for flashing (in the attached example code, 0xeb110000 is used). Also, please note that you cannot connect to the ROM via UART if you have the terminal connection open in MCUXpresso.

It would be great if the documentation (IMXRT1170RM) had used the updated name for ROM_RunBootloader(), and if it had included that you need to initialise the driver with ROM_API_Init() and which driver these functions are part of (fsl_romapi).

Anyway, thanks again for your help @jeremyzhou !

View solution in original post

6 Replies
2,184 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
To provide the fastest possible support, I'd highly recommend you refer to the 10.13.3 Enter Bootloader API section.

jeremyzhou_0-1635122681507.png

Have a great day,
TIC

-------------------------------------------------------------------------------
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,181 Views
D_TTSA
Contributor V

Thanks, but that isn't very helpful.

One cannot simply call runBootLoader or reference g_bootloaderTree - is it part of a driver or middleware component in the SDK? Because if so, I haven't found it there.

0 Kudos
2,173 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
In the fsl_romapi.c, it provides the ROM_RunBootloader function to call Enter Bootloader API, you can give it a try.

jeremyzhou_0-1635212192890.png

Have a great day,
TIC

-------------------------------------------------------------------------------
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,159 Views
D_TTSA
Contributor V

HI @jeremyzhou 

Thanks for your reply.

I added the fsl_romapi driver to the freertos_hello_cm7 SDK example. Then I tried using ROM_RunBootloader( ) by changing the hello_task to this:

D_Tram23_2-1635337576856.png

Note that BOOTLDR_CONF_ARG is:

D_Tram23_3-1635337600472.png

This value was based on the RT1170RM's typical use case for runBootloader (Section 10.13.3):

D_Tram23_0-1635334357079.png

Also note that I added the ROM_API_Init() and SCB_DisableICache() calls because I saw that was done in the fsl_romapi_cm7 SDK example, before any other fsl_romapi functions are called.

However, when I try connecting to the board with MCUXpresso Secure Provisioning Tool, it doesn't pick up the board:

D_Tram23_1-1635333217943.png

I did try running it without the ROM_API_Init() and SCB_DisableICache() calls too.
If I put the board into ISP mode manually (by shorting the relevant jumper), then the Tool can connect.

0 Kudos
2,153 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
It works well on my side, in addition, I can select USB or UART to contact the MCU.
The attachment is my demo code and you can give it a try.

jeremyzhou_0-1635403202003.png

 


Have a great day,
TIC
-------------------------------------------------------------------------------
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,140 Views
D_TTSA
Contributor V

Hi @jeremyzhou 

I found the problem I was having. I was passing the value (BOOTLDR_CONF_ARG -> 0xeb100000) as a pointer, instead of passing a pointer to a variable containing this value (&arg).

This allows me to enter ISP mode in the FreeRTOS example too (you showed the Baremetal Hello World example).

For future readers, note that you need to use arg = 0xeb100000 if you would like to have the option of connecting with UART or USB for flashing (in the attached example code, 0xeb110000 is used). Also, please note that you cannot connect to the ROM via UART if you have the terminal connection open in MCUXpresso.

It would be great if the documentation (IMXRT1170RM) had used the updated name for ROM_RunBootloader(), and if it had included that you need to initialise the driver with ROM_API_Init() and which driver these functions are part of (fsl_romapi).

Anyway, thanks again for your help @jeremyzhou !