How to do SW reset on i.mxRT117x

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

How to do SW reset on i.mxRT117x

跳至解决方案
1,823 次查看
revolutesea
Contributor II

Hi, 

I failed to test NVIC_SystemReset on i.MX RT1170 EVK.

I use hello world example to test software reset.

The attachment is my test project. My SDK version is 2.10.0 and MCUXPRESSO version is 11.4.0

Could you point out what's wrong or provide a example which could do software reset.

 

int main(void)
{
char ch;

/* Init board hardware. */
BOARD_ConfigMPU();
BOARD_InitPins();
BOARD_BootClockRUN();
BOARD_InitDebugConsole();

PRINTF("hello world.\r\n");
PRINTF("\r\nBBB!\r\n");
__disable_irq();
NVIC_SystemReset();
//SRC_AssertSliceSoftwareReset(SRC, kSRC_M7CoreSlice);
PRINTF("\r\nWon't get here\r\n");

while (1)
{
ch = GETCHAR();
PUTCHAR(ch);
}
}

 

Thanks,

 

0 项奖励
回复
1 解答
1,800 次查看
victorjimenez
NXP TechSupport
NXP TechSupport

Hello Sean, 

In the screenshot of the RT1170, I can see that you are on the debug session. This is why you are only seeing the Hello World one time. If you exit the debug session, you will see the same results as in the LPC. Here's a screenshot of my results. 

victorjimenez_0-1629829532160.png

Regards,
Victor 

在原帖中查看解决方案

3 回复数
1,808 次查看
revolutesea
Contributor II

Hi Victor

 

Thank you for your testing.

May I know your UART log messages?

There is my UART log, I expect that Hello World would be printed over and over again.

But there only print Hello World once in UART.

Dose your "Hello World" could continuous printing by software reset?

revolutesea_0-1629696008472.png

 

Below screenshot is LPC55S28 software reset test in hello world example.

LPC55S28 could be reset again and again. I want to do this on i.mxRT1176. 

revolutesea_3-1629697160170.png

 

 

 

Thank you,

Sean

 

0 项奖励
回复
1,801 次查看
victorjimenez
NXP TechSupport
NXP TechSupport

Hello Sean, 

In the screenshot of the RT1170, I can see that you are on the debug session. This is why you are only seeing the Hello World one time. If you exit the debug session, you will see the same results as in the LPC. Here's a screenshot of my results. 

victorjimenez_0-1629829532160.png

Regards,
Victor 

1,816 次查看
victorjimenez
NXP TechSupport
NXP TechSupport

Hello, 

I just made a couple of tests, and I didn't face any problems. I took the same example, hello_world_demo_cm7, and I made the same modifications. Everything went fine on my end. 

int main(void)
{
    char ch;

    /* Init board hardware. */
    BOARD_ConfigMPU();
    BOARD_InitPins();
    BOARD_BootClockRUN();
    BOARD_InitDebugConsole();

    PRINTF("hello world.\r\n");
    __disable_irq();
    NVIC_SystemReset();
	PRINTF("Not reaching this point!\r\n");

    while (1)
    {
        ch = GETCHAR();
        PUTCHAR(ch);
    }
}

Regards,
Victor 

0 项奖励
回复