RT1176 controller reset issue

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

RT1176 controller reset issue

1,394 次查看
Pavankumar1
Contributor III

Hello,

I'm using an RT1176 controller with a custom bootloader. My application code is configured to boot from the memory address 0x30025000. Occasionally, after calling NVIC_SystemReset() for a software reset, the application fails to jump correctly to the application start address (0x30025000). This sinerio ocuurs once in 10 times.

In my bootloader code, I'm performing the following steps to jump to the application:

// Disable both D and I caches, Application will enable them back.

SCB_DisableDCache();

SCB_DisableICache();

__DMB();

DisableGlobalIRQ();

// Relocate vector table to application base address.

SCB->VTOR = (__IOM uint32_t)APP1_BASE_ADDRESS;

// Define Application function.

uint32_t jumpAddress = *(uint32_t*)(APP1_BASE_ADDRESS + 4U );

F_Bootloader_Jump_t jump = (F_Bootloader_Jump_t)jumpAddress;

// Set stack pointers to the Application stack pointer. __set_MSP((uint32_t*)APP1_BASE_ADDRESS);

__set_PSP(*(uint32_t*)APP1_BASE_ADDRESS);

// Jump to Application.

jump();

Where APP1_BASE_ADDRESS is defined as (0x30000000 + (0x1000 * 37)).

Could you please advise if there's any mistake in my jump sequence that could cause this intermittent issue? What steps can I take to ensure reliable application booting after a software reset?

Thank you.

0 项奖励
回复
3 回复数

1,326 次查看
Habib_MS
NXP Employee
NXP Employee

Hello @Pavankumar1,

Sorry for taking a while to get back to you. In order to support you better, can you provide me more information about your application?

-Are you running in XIP mode?
-can you provide more context about your application and in which cases uses NVIC_SystemReset()?
-what is the memory that is used in your application?

Also, I understand that you are currently using a secondary bootloader, if this is the case the SDK (version 2.16) provides an example of this called "mcuboot_opensource". I highly recommend look into in this example in order to know how it works.
BR
Habib.

0 项奖励
回复

1,298 次查看
Pavankumar1
Contributor III
Thank you for the replay .@Habib_MS
1. -Are you running in XIP mode?
Yes I am running in XIP mode.
2. -can you provide more context about your application and in which cases uses NVIC_SystemReset()?
Based on the CAN message received from I am using NVIC_SystemReset() to restart the MCU.
3. -what is the memory that is used in your application?
External 16MB flash and 16MB external SDRAM.
0 项奖励
回复

1,247 次查看
Habib_MS
NXP Employee
NXP Employee

Hello again @Pavankumar1,
When performing a software reset, the FLASH must also be reset, this is because when the primary bootloader runs it will initialize the communication in single line 1-1-1 mode to get the FCB (FlexSPI Configuration Block) first. However, the flash was previously initialized and is not communicating over single line and is throwing an error. in order to try and pinpoint if that is the problem, can you reset the FLASH before a NVIC_SystemReset()?

Also, in this app note shows how "Implement Second Bootloader on i.MX RT10xx Series", although this app note uses RT10xx series, is the same concept for the RT1176

 

BR
Habib

0 项奖励
回复