⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 crt0_str75x_freertos.s

📁 FreeRTOS is a portable, open source, mini Real Time Kernel - a free to download and royalty free RTO
💻 S
📖 第 1 页 / 共 3 页
字号:
	MOV    r3,r3,LSL r2
	STR    r3,[r0, #IPR_off_addr]		/*; Clear the corresponding IPR bit. */
	
	portRESTORE_CONTEXT					/*; Restore the context of the selected task. */

/*;*******************************************************************************
;* Function Name  : PrefetchAbortHandler
;* Description    : This function called when Prefetch Abort
;                   exception is entered.
;* Input          : none
;* Output         : none
;*********************************************************************************/

PrefetchAbortHandler:
		NOP
		B PrefetchAbortHandler

/*;*******************************************************************************
;* Function Name  : DataAbortHandler
;* Description    : This function is called when Data Abort
;                   exception is entered.
;* Input          : none
;* Output         : none
;********************************************************************************/

DataAbortHandler:
		NOP
		NOP
		B DataAbortHandler
                              /*; ...has generated the data abort exception.*/

/*;*******************************************************************************
;* Function Name  : FIQHandler
;* Description    : This function is called when FIQ
;*                  exception is entered.
;* Input          : none
;* Output         : none
;********************************************************************************/

FIQHandler:
        SUB    lr,lr,#4       /*; Update the link register.*/
        SaveContext r0,r7     /*; Save the workspace plus the current*/
                              /*; return address lr_ fiq and spsr_fiq.*/
        BL      FIQ_Handler   /*; Branch to FIQ_Handler.*/
        RestoreContext r0,r7  /*; Restore the context and return to the...*/
                              /*; ...program execution.*/

/*;*******************************************************************************
;* Macro Name     : IRQ_to_SYS
;* Description    : This macro used to switch form IRQ mode to SYS mode
;* Input          : none.
;* Output         : none
;*******************************************************************************/
       .macro IRQ_to_SYS

        MSR    cpsr_c,#0x1F
        STMFD  sp!,{lr}
       .endm
/*;*******************************************************************************
;* Macro Name     : SYS_to_IRQ
;* Description    : This macro used to switch from SYS mode to IRQ mode
;                   then to return to IRQHnadler routine.
;* Input          : none.
;* Output         : none.
;*******************************************************************************/
      .macro SYS_to_IRQ
       LDMFD  sp!,{lr}      /*; Restore the link register. */
        MSR    cpsr_c,#0xD2  /*; Switch to IRQ mode.*/
        MOV    pc,lr         /*; Return to IRQHandler routine to clear the*/
                             /*; pending bit.*/
       .endm

/*;*******************************************************************************
;* Function Name  : WAKUPIRQHandler
;* Description    : This function used to switch to SYS mode before entering
;*                  the WAKUP_IRQHandler function located in 75x_it.c.
;*                  Then to return to IRQ mode after the
;*                  WAKUP_IRQHandler function termination.
;* Input          : none
;* Output         : none
;*******************************************************************************/
WAKUPIRQHandler:
        IRQ_to_SYS
        BL     WAKUP_IRQHandler
        SYS_to_IRQ

/*;*******************************************************************************
;* Function Name  : TIM2_OC2IRQHandler
;* Description    : This function used to switch to SYS mode before entering
;*                  the TIM3_OC2_IRQHandler function located in 75x_it.c.
;*                  Then to return to IRQ mode after the
;*                  TIM2_OC2_IRQHandler function termination.
;* Input          : none
;* Output         : none
;*******************************************************************************/
TIM2_OC2IRQHandler:
        IRQ_to_SYS
        BL     TIM2_OC2_IRQHandler
        SYS_to_IRQ

/*;*******************************************************************************
;* Function Name  : TIM2_OC1IRQHandler
;* Description    : This function used to switch to SYS mode before entering
;*                  the TIM2_OC1_IRQHandler function located in 75x_it.c.
;*                  Then to return to IRQ mode after the
;*                  TIM2_OC1_IRQHandler function termination.
;* Input          : none
;* Output         : none
;*******************************************************************************/
TIM2_OC1IRQHandler:
        IRQ_to_SYS
        BL     TIM2_OC1_IRQHandler
        SYS_to_IRQ

/*;*******************************************************************************
;* Function Name  : TIM2_IC12IRQHandler
;* Description    : This function used to switch to SYS mode before entering
;*                  the TIM2_IC12_IRQHandler function located in 75x_it.c.
;*                  Then to return to IRQ mode after the
;*                  TIM2_IC12_IRQHandler function termination.
;* Input          : none
;* Output         : none
;*******************************************************************************/
TIM2_IC12IRQHandler:
        IRQ_to_SYS
        BL     TIM2_IC12_IRQHandler
        SYS_to_IRQ

/*;*******************************************************************************
;* Function Name  : TIM2_UPIRQHandler
;* Description    : This function used to switch to SYS mode before entering
;*                  the TIM2_UP_IRQHandler function located in 75x_it.c.
;*                  Then to return to IRQ mode after the
;*                  TIM3_UP_IRQHandler function termination.
;* Input          : none
;* Output         : none
;*******************************************************************************/
TIM2_UPIRQHandler:
        IRQ_to_SYS
        BL     TIM2_UP_IRQHandler
        SYS_to_IRQ

/*;*******************************************************************************
;* Function Name  : TIM1_OC2IRQHandler
;* Description    : This function used to switch to SYS mode before entering
;*                  the TIM1_OC2_IRQHandler function located in 75x_it.c.
;*                  Then to return to IRQ mode after the
;*                  TIM1_OC2_IRQHandler function termination.
;* Input          : none
;* Output         : none
;*******************************************************************************/
TIM1_OC2IRQHandler:
        IRQ_to_SYS
        BL     TIM1_OC2_IRQHandler
        SYS_to_IRQ

/*;*******************************************************************************
;* Function Name  : TIM1_OC1IRQHandler
;* Description    : This function used to switch to SYS mode before entering
;*                  the TIM1_OC1_IRQHandler function located in 75x_it.c.
;*                  Then to return to IRQ mode after the
;*                  TIM1_OC1_IRQHandler function termination.
;* Input          : none
;* Output         : none
;*******************************************************************************/
TIM1_OC1IRQHandler:
        IRQ_to_SYS
        BL     TIM1_OC1_IRQHandler
        SYS_to_IRQ

/*;*******************************************************************************
;* Function Name  : TIM1_IC12IRQHandler
;* Description    : This function used to switch to SYS mode before entering
;*                  the TIM1_IC12_IRQHandler function located in 75x_it.c.
;*                  Then to return to IRQ mode after the
;*                  TIM1_IC12_IRQHandler function termination.
;* Input          : none
;* Output         : none
;*******************************************************************************/
TIM1_IC12IRQHandler:
        IRQ_to_SYS
        BL     TIM1_IC12_IRQHandler
        SYS_to_IRQ

/*;*******************************************************************************
;* Function Name  : TIM1_UPIRQHandler
;* Description    : This function used to switch to SYS mode before entering
;*                  the TIM1_UP_IRQHandler function located in 75x_it.c.
;*                  Then to return to IRQ mode after the
;*                  TIM1_UP_IRQHandler function termination.
;* Input          : none
;* Output         : none
;*******************************************************************************/
TIM1_UPIRQHandler:
        IRQ_to_SYS
        BL     TIM1_UP_IRQHandler
        SYS_to_IRQ

/*;*******************************************************************************
;* Function Name  : TIM0_OC2IRQHandler
;* Description    : This function used to switch to SYS mode before entering
;*                  the TIM0_OC2_IRQHandler function located in 75x_it.c.
;*                  Then to return to IRQ mode after the
;*                  TIM0_OC2_IRQHandler function termination.
;* Input          : none
;* Output         : none
;*******************************************************************************/
TIM0_OC2IRQHandler:
        IRQ_to_SYS
        BL     TIM0_OC2_IRQHandler
        SYS_to_IRQ

/*;*******************************************************************************
;* Function Name  : TIM0_OC1IRQHandler
;* Description    : This function used to switch to SYS mode before entering
;*                  the TIM0_OC1_IRQHandler function located in 75x_it.c.
;*                  Then to return to IRQ mode after the
;*                  TIM0_OC1_IRQHandler function termination.
;* Input          : none
;* Output         : none
;*******************************************************************************/
TIM0_OC1IRQHandler:
        IRQ_to_SYS
        BL     TIM0_OC1_IRQHandler
        SYS_to_IRQ

/*;*******************************************************************************
;* Function Name  : TIM0_IC12IRQHandler
;* Description    : This function used to switch to SYS mode before entering
;*                  the TIM0_IC12_IRQHandler function located in 75x_it.c.
;*                  Then to return to IRQ mode after the
;*                  TIM0_IC12_IRQHandler function termination.
;* Input          : none
;* Output         : none
;********************************************************************************/
TIM0_IC12IRQHandler:
        IRQ_to_SYS
        BL     TIM0_IC12_IRQHandler
        SYS_to_IRQ

/*;*******************************************************************************
;* Function Name  : TIM0_UPIRQHandler
;* Description    : This function used to switch to SYS mode before entering
;*                  the TIM0_UP_IRQHandler function located in 75x_it.c.
;*                  Then to return to IRQ mode after the
;*                  TIM0_UP_IRQHandler function termination.
;* Input          : none
;* Output         : none
;********************************************************************************/
TIM0_UPIRQHandler:
        IRQ_to_SYS
        BL     TIM0_UP_IRQHandler
        SYS_to_IRQ

/*;*******************************************************************************
;* Function Name  : PWM_OC123IRQHandler
;* Description    : This function used to switch to SYS mode before entering
;*                  the PWM_OC123_IRQHandler function located in 75x_it.c.
;*                  Then to return to IRQ mode after the
;*                    PWM_OC123_IRQHandler function termination.
;* Input          : none
;* Output         : none
;********************************************************************************/
PWM_OC123IRQHandler:
        IRQ_to_SYS
        BL     PWM_OC123_IRQHandler
        SYS_to_IRQ

/*;*******************************************************************************
;* Function Name  : PWM_EMIRQHandler
;* Description    : This function used to switch to SYS mode before entering
;*                  the PWM_EM_IRQHandler function located in 75x_it.c.
;*                  Then to return to IRQ mode after the
;*                  PWM_EM_IRQHandler function termination.
;* Input          : none
;* Output         : none
;*******************************************************************************/
PWM_EMIRQHandler:
        IRQ_to_SYS
        BL     PWM_EM_IRQHandler
        SYS_to_IRQ

/*;*******************************************************************************
;* Function Name  : PWM_UPIRQHandler
;* Description    : This function used to switch to SYS mode before entering
;*                  the PWM_UP_IRQHandler function located in 75x_it.c.
;*                  Then to return to IRQ mode after the
;*                  PWM_UP_IRQHandler function termination.
;* Input          : none
;* Output         : none
;*******************************************************************************/
PWM_UPIRQHandler:
        IRQ_to_SYS
        BL     PWM_UP_IRQHandler
        SYS_to_IRQ

/*;*******************************************************************************
;* Function Name  : I2CIRQHandler
;* Description    : This function used to switch to SYS mode before entering
;*                  the I2C_IRQHandler function located in 75x_it.c.
;*                  Then to return to IRQ mode after the
;*                  I2C_IRQHandler function termination.
;* Input          : none
;* Output         : none
;*******************************************************************************/
I2CIRQHandler:
        IRQ_to_SYS
        BL     I2C_IRQHandler
        SYS_to_IRQ

/*;*******************************************************************************
;* Function Name  : SSP1IRQHandler
;* Description    : This function used to switch to SYS mode before entering
;*                  the SSP1_IRQHandler function located in 75x_it.c.
;*                  Then to return to IRQ mode after the
;*                  SSP1_IRQHandler function termination.
;* Input          : none
;* Output         : none
;*******************************************************************************/
SSP1IRQHandler:
        IRQ_to_SYS
        BL     SSP1_IRQHandler
        SYS_to_IRQ

/*;*******************************************************************************
;* Function Name  : SSP0IRQHandler
;* Description    : This function used to switch to SYS mode before entering
;*                  the SSP0_IRQHandler function located in 75x_it.c.
;*                  Then to return to IRQ mode after the
;*                  SSP0_IRQHandler function termination.
;* Input          : none
;* Output         : none
;*******************************************************************************/
SSP0IRQHandler:
        IRQ_to_SYS
        BL     SSP0_IRQHandler
        SYS_to_IRQ

/*;*******************************************************************************
;* Function Name  : UART2IRQHandler
;* Description    : This function used to switch to SYS mode before entering
;*                  the UART2_IRQHandler function located in 75x_it.c.
;*                  Then to return to IRQ mode after the
;*                  UART2_IRQHandler function termination.
;* Input          : none
;* Output         : none
;*******************************************************************************/
UART2IRQHandler:
        IRQ_to_SYS
        BL     UART2_IRQHandler
        SYS_to_IRQ

/*;*******************************************************************************
;* Function Name  : UART1IRQHandler

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -