none
soft reset for freescale imx6q-WEC RRS feed

  • Question

  • Hi All,

    I am working on Freescale's iMX6Q board. I am trying to implement Soft reset for the device.

    Iam calling an API  KernelIoControl(IOCTL_HAL_REBOOT, NULL, 0, NULL, 0, NULL) 

    But am unable to reset my device.It gets shutdown but doesnot restart.

    Regards

    Rizwan Syed

    Friday, November 13, 2015 11:16 AM

Answers

  • Hi,

    SETREG32(&g_pIOMUX->GPR[1], IOMUX_GPR1_TEST_PWR_DOWN_MASK);

    set the above register and call IOCTL_HAL_REBOOT ,Then reset happens successfully.

    Regards

    Rizwan Syed

    • Marked as answer by RizwanSyed Wednesday, November 25, 2015 5:53 AM
    Wednesday, November 25, 2015 5:53 AM

All replies

  • Hello,

    i would use SetSystemPowerState with POWER_STATE_RESET. IOCTL_HAL_REBOOT does not inform the "system" about shutdown. This may be critical in some cases, e.g. while writing to flash memory while call "IOCTL_HAL_REBOOT". POWER_STATE_RESET informs the device manager  ... .


    Maybe this does not resolve your problem.  Do you have any details were the system hangs while reboot (boot output)?
    Friday, November 13, 2015 1:35 PM
  • Hi Christian Zutter

    I have already tried with POWER_STATE_RESET.It has no effect.

    wherever i call IOCTL_HAL_REBOOT ,it gets hang there itself.

    Regards

    Rizwan Syed

    Saturday, November 14, 2015 5:08 AM
  • Hi Rizwan,

    If you has the BSP source code and build setup, then IOCTL_HAL_REBOOT might have the implementation source code.

    Its best to add your own RETAILMSG s or compile the OS Design in Debug build and check what is going on.

    Regards,

    GSR

    Monday, November 16, 2015 6:11 AM
  • HI

    The log is as follows:

    PID:00400004 TID:00000016 OEMMpPerCPUInit:  CPU3 is running
    PID:00400005 TID:00000016 OEMMpPerCPUInit:  CPU2 is running
    PID:00400003 TID:00000016 OEMMpPerCPUInit:  CPU1 is running
    PID:00400004 TID:008D0006 CPU Num:4
    PID:00400004 TID:008D0006 Allocated new interlock ID:10
    PID:00400004 TID:008D0006 Allocated new interlock ID:11
    PID:00400004 TID:008D0006 m_dwVendorVersion=0x0
    PID:00400004 TID:008D0006 SDHC[3]: Using ADMA2
    PID:00400002 TID:008D0006 SYSCTL 0x008E40FF
    PID:00400002 TID:008D0006 m_dwVendorVersion=0x0
    PID:00400002 TID:008D0006 SDHC[4]: Using ADMA2
    PID:00400002 TID:008D0006 SYSCTL 0x008E40FF
    PID:00400002 TID:01540006 SYSCTL 0x008E40FF
    PID:00400004 TID:01670006 SYSCTL 0x008E40FF
    PID:00400002 TID:01540006 SYSCTL 0x008E007F
    PID:00400002 TID:01540006 SYSCTL 0x008E040F
    PID:00400002 TID:01540006 SYSCTL 0x008E003F
    PID:00400002 TID:01670006 SYSCTL 0x008E009F
    PID:00400002 TID:01670006 SYSCTL 0x008E014F
    PID:00400002 TID:01670006 SYSCTL 0x008E003F
    PID:00400002 TID:01670006 CUSDHCBase::SetInterface: Setting for 8 bit mode
    PID:00400002 TID:01670006 CUSDHCBase::SetInterface: PROCTL value = 0x7800025
    PID:00400002 TID:01670006 SYSCTL 0x008E003F
    PID:00400005 TID:008D0006 Allocated new interlock ID:12
    PID:00400003 TID:008D0006 Port(2) - USBClockCanClockGating(1), return 0x1, value 0x4
    PID:00400005 TID:008D0006 Port(1) - USBClockCanClockGating(1), return 0x1, value 0x6
    PID:00400005 TID:008D0006 sensorId 2
    PID:00400005 TID:008D0006 PCIBUS!DllMain: process attach
    PID:00400005 TID:008D0006 u32LinkStatus 0
    PID:00400005 TID:008D0006  PCIE:Link Failed
    PID:00400005 TID:008D0006 PCIBUS!DllMain: process detach
    PID:00400002 TID:008D0006 ENETEnetInit
    PID:00400002 TID:008D0006 u32Id=221622
    PID:00400002 TID:008D0006 ENET is Full Duplex
    PID:00400002 TID:008D0006 u32Id=221622
    PID:00400002 TID:008D0006 ENET is Full Duplex
    PID:00400002 TID:03B60006 ENETGetPHYId2: The name for the external PHY is KSZ9031
    PID:00400002 TID:008D0006 m_dwVendorVersion=0x0
    PID:00400002 TID:008D0006 SDHC[2]: Using ADMA2
    PID:00400002 TID:008D0006 SDHC[2] is polling card detection
    PID:00400002 TID:008D0006 SYSCTL 0x008E40FF
    PID:00400002 TID:02F70002 Port(2) - USBClockCanClockGating(0), return 0x0, value 0x2
    PID:00400002 TID:0226000A SYSCTL 0x008E40FF
    PID:00400002 TID:031B0002 Port(1) - USBClockCanClockGating(0), return 0x0, value 0x10
    PID:00400003 TID:008D0006 LED_DllEntry: DLL_PROCESS_ATTACH lpvReserved(0x8023a458)
    PID:00400002 TID:008D0006 GPIO_DllEntry: DLL_PROCESS_ATTACH lpvReserved(0x8023a458)
    PID:00400002 TID:008D0006 RESTART_DllEntry: DLL_PROCESS_ATTACH lpvReserved(0x8023a458)
    PID:00400002 TID:008D0006 RESTART_Init....
    PID:00400004 TID:058B0002 KeybdDriverInitializeEx: Layout Manager successfully initialized to  1
    PID:00400002 TID:03B60006 ENET is linked,  Speed  10Mbps Half Duplex
    PID:00400002 TID:03B60006 ENET is linked,  Speed  10Mbps Full Duplex
    PID:00400002 TID:03B60006 ENET is linked,  Speed  100Mbps Half Duplex
    PID:00400002 TID:03B60006 ENET is linked,  Speed  100Mbps Full Duplex
    PID:00400002 TID:03B60006 ENET is linked,  Speed  1000Mbps Full Duplex
    PID:00400002 TID:058B0002 TchProxy: Waiting for touch driver to load.
    PID:00400002 TID:058B0002 TchProxy: Waiting for touch driver to load.
    PID:00400002 TID:058B0002 TchProxy: Timed out waiting for touch driver to load. Move Touch Driver registry settings to HKLM\Drivers\Touch.
    PID:00400003 TID:058B0002 TchProxy: GetDeviceCaps: Warning Since Touch stream driver is not loaded this call will return error or default values.
    PID:017D0045 TID:05D4001E MSIM: IM_ReadRegistry read KB 5
    PID:05810012 TID:04B30076 Explorer(V2.0) taskbar thread started.
    PID:00400005 TID:03F2000E NDISPWR:: Found adapter [ENET1]
    PID:047F007A TID:041701C2
     LaunchingPID:047F007A TID:041701C2 cerdisp -cPID:047F007A TID:041701C2
    PID:074A0046 TID:07A50046
    Failed ActivateDevice  1610                     PID:074A0046 TID:07A50046
    Calling CreateFile              PID:00400002 TID:07A50046 RESTART_Open
    PID:074A0046 TID:07A50046
     Restart application launched&.Restart in 20 seconds                    PID:00400002 TID:07A50046 RESTART_IOControl +++++
    PID:00400002 TID:07A50046 RESTART_IOControl QWERTYUIOSDXVGFBHNJ
    PID:00400003 TID:00CA0006 BSPBacklightSetIntensity level=0
    PID:00400002 TID:00CA0006 MPSetPowerLow- Power State Changed; Disabling HW
                                                                               PID:00400002 TID:00CA0006 MPSetPowerLow- HW Disabled
                                                                                                                                    PID:00400002 TID:00CA0006 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
    nPID:00400002 TID:00CA0006 PCSP_WDOG_REGS....

    Tuesday, November 17, 2015 5:05 AM
  • Hi,

    Is there any wince specific operations need to be done before reset or any thing regarding watchdog timer or pmic operations?

    Tuesday, November 17, 2015 5:38 AM
  • Hi,

    watchdog works in EBoot and OAL layer but it does not work in Driver level.

    Is there any specific difference in both the layers?

    what changes are required for software reset to make it work in Driver level?

    Regards

    Rizwan Syed

    Thursday, November 19, 2015 6:44 AM
  • Hi,

    SETREG32(&g_pIOMUX->GPR[1], IOMUX_GPR1_TEST_PWR_DOWN_MASK);

    set the above register and call IOCTL_HAL_REBOOT ,Then reset happens successfully.

    Regards

    Rizwan Syed

    • Marked as answer by RizwanSyed Wednesday, November 25, 2015 5:53 AM
    Wednesday, November 25, 2015 5:53 AM