gateway_mcu/CH32V303-FreeRTOS/User/ch32v30x_it.c

50 lines
1.4 KiB
C
Raw Normal View History

2025-02-21 10:07:21 +00:00
/********************************** (C) COPYRIGHT *******************************
* File Name : ch32v30x_it.c
* Author : WCH
* Version : V1.0.0
* Date : 2024/03/05
* Description : Main Interrupt Service Routines.
*********************************************************************************
* Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
* Attention: This software (modified or not) and binary are used for
* microcontroller manufactured by Nanjing Qinheng Microelectronics.
*******************************************************************************/
#include "ch32v30x_it.h"
void NMI_Handler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
void HardFault_Handler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
/*********************************************************************
* @fn NMI_Handler
*
* @brief This function handles NMI exception.
*
* @return none
*/
void NMI_Handler(void)
{
while (1)
{
}
}
/*********************************************************************
* @fn HardFault_Handler
*
* @brief This function handles Hard Fault exception.
*
* @return none
*/
void HardFault_Handler(void)
{
2025-03-05 08:27:39 +00:00
// NVIC_SystemReset();
printf("mepc:%08x\n",__get_MEPC());
printf("mcause:%08x\n",__get_MCAUSE());
printf("mtval:%08x\n",__get_MTVAL());
2025-02-21 10:07:21 +00:00
while (1)
{
}
}