iMXRT reboot

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

iMXRT reboot

跳至解决方案
1,469 次查看
mspenard603
Contributor IV

How does one reboot, in software, an iMXRT1062?

0 项奖励
回复
1 解答
1,365 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi Mike,

Thanks for your reply.
it can make the RT1062 reboot via calling NVIC_SystemReset();
I've attached a sample code that inherits from the hello_world demo in the SDK library. And the testing result is also presented below.

/*
 * Copyright (c) 2013 - 2015, Freescale Semiconductor, Inc.
 * Copyright 2016-2017 NXP
 * All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#include "fsl_device_registers.h"
#include "fsl_debug_console.h"
#include "board.h"

#include "pin_mux.h"
#include "clock_config.h"
/*******************************************************************************
 * Definitions
 ******************************************************************************/


/*******************************************************************************
 * Prototypes
 ******************************************************************************/

/*******************************************************************************
 * Code
 ******************************************************************************/
/*!
 * @brief Main function
 */
int main(void)
{
    char ch;

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

    PRINTF("\r\n hello world.\r\n");

    while (1)
    {
        ch = GETCHAR();
        if(ch == 'y')
        {
          NVIC_SystemReset();
        }
        PUTCHAR(ch);
    }
}

pastedImage_1.png

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.
-------------------------------------------------------------------------------

在原帖中查看解决方案

3 回复数
1,365 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi Mike Spenard,

Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
Actually, I'm not very clear about your question, please you can clarify it.

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 项奖励
回复
1,365 次查看
mspenard603
Contributor IV

Sure, I'm simply looking for a way to make a call that reboots the MCU.

0 项奖励
回复
1,366 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi Mike,

Thanks for your reply.
it can make the RT1062 reboot via calling NVIC_SystemReset();
I've attached a sample code that inherits from the hello_world demo in the SDK library. And the testing result is also presented below.

/*
 * Copyright (c) 2013 - 2015, Freescale Semiconductor, Inc.
 * Copyright 2016-2017 NXP
 * All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#include "fsl_device_registers.h"
#include "fsl_debug_console.h"
#include "board.h"

#include "pin_mux.h"
#include "clock_config.h"
/*******************************************************************************
 * Definitions
 ******************************************************************************/


/*******************************************************************************
 * Prototypes
 ******************************************************************************/

/*******************************************************************************
 * Code
 ******************************************************************************/
/*!
 * @brief Main function
 */
int main(void)
{
    char ch;

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

    PRINTF("\r\n hello world.\r\n");

    while (1)
    {
        ch = GETCHAR();
        if(ch == 'y')
        {
          NVIC_SystemReset();
        }
        PUTCHAR(ch);
    }
}

pastedImage_1.png

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.
-------------------------------------------------------------------------------