V2.0
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
;* File Name : startup_ch32v20x_D6.s
|
||||
;* Author : WCH
|
||||
;* Version : V1.0.1
|
||||
;* Date : 2023/11/11
|
||||
;* Date : 2024/01/31
|
||||
;* Description : CH32V203F6-CH32V203F8-CH32V203G6-CH32V203G8-CH32V203K6-CH32V203K8-CH32V203C6-CH32V203C8-CH32V203G8
|
||||
;* vector table for eclipse toolchain.
|
||||
;*********************************************************************************
|
||||
@@ -81,8 +81,8 @@ _vector_base:
|
||||
.word EXTI15_10_IRQHandler /* EXTI Line 15..10 */
|
||||
.word RTCAlarm_IRQHandler /* RTC Alarm through EXTI Line */
|
||||
.word USBWakeUp_IRQHandler /* USB Wake up from suspend */
|
||||
.word USBHD_IRQHandler /* USBHD Break */
|
||||
.word USBHDWakeUp_IRQHandler /* USBHD Wake up from suspend */
|
||||
.word USBFS_IRQHandler /* USBFS Break */
|
||||
.word USBFSWakeUp_IRQHandler /* USBFS Wake up from suspend */
|
||||
.word UART4_IRQHandler /* UART4 */
|
||||
.word DMA1_Channel8_IRQHandler /* DMA1 Channel8 */
|
||||
|
||||
@@ -138,8 +138,8 @@ _vector_base:
|
||||
.weak EXTI15_10_IRQHandler /* EXTI Line 15..10 */
|
||||
.weak RTCAlarm_IRQHandler /* RTC Alarm through EXTI Line */
|
||||
.weak USBWakeUp_IRQHandler /* USB Wakeup from suspend */
|
||||
.weak USBHD_IRQHandler /* USBHD */
|
||||
.weak USBHDWakeUp_IRQHandler /* USBHD Wake Up */
|
||||
.weak USBFS_IRQHandler /* USBFS */
|
||||
.weak USBFSWakeUp_IRQHandler /* USBFS Wake Up */
|
||||
.weak UART4_IRQHandler /* UART4 */
|
||||
.weak DMA1_Channel8_IRQHandler /* DMA1 Channel8 */
|
||||
|
||||
@@ -193,8 +193,8 @@ USART3_IRQHandler:
|
||||
EXTI15_10_IRQHandler:
|
||||
RTCAlarm_IRQHandler:
|
||||
USBWakeUp_IRQHandler:
|
||||
USBHD_IRQHandler:
|
||||
USBHDWakeUp_IRQHandler:
|
||||
USBFS_IRQHandler:
|
||||
USBFSWakeUp_IRQHandler:
|
||||
UART4_IRQHandler:
|
||||
DMA1_Channel8_IRQHandler:
|
||||
1:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
;* File Name : startup_ch32v20x_D8.s
|
||||
;* Author : WCH
|
||||
;* Version : V1.0.1
|
||||
;* Date : 2023/11/20
|
||||
;* Date : 2024/01/31
|
||||
;* Description : CH32V203RB
|
||||
;* vector table for eclipse toolchain.
|
||||
;*********************************************************************************
|
||||
@@ -81,8 +81,8 @@ _vector_base:
|
||||
.word EXTI15_10_IRQHandler /* EXTI Line 15..10 */
|
||||
.word RTCAlarm_IRQHandler /* RTC Alarm through EXTI Line */
|
||||
.word USBWakeUp_IRQHandler /* USB Wake up from suspend */
|
||||
.word USBHD_IRQHandler /* USBHD Break */
|
||||
.word USBHDWakeUp_IRQHandler /* USBHD Wake up from suspend */
|
||||
.word USBFS_IRQHandler /* USBFS Break */
|
||||
.word USBFSWakeUp_IRQHandler /* USBFS Wake up from suspend */
|
||||
.word ETH_IRQHandler /* ETH global */
|
||||
.word ETHWakeUp_IRQHandler /* ETH Wake up */
|
||||
.word 0 /* BLE BB */
|
||||
@@ -145,8 +145,8 @@ _vector_base:
|
||||
.weak EXTI15_10_IRQHandler /* EXTI Line 15..10 */
|
||||
.weak RTCAlarm_IRQHandler /* RTC Alarm through EXTI Line */
|
||||
.weak USBWakeUp_IRQHandler /* USB Wakeup from suspend */
|
||||
.weak USBHD_IRQHandler /* USBHD */
|
||||
.weak USBHDWakeUp_IRQHandler /* USBHD Wake Up */
|
||||
.weak USBFS_IRQHandler /* USBFS */
|
||||
.weak USBFSWakeUp_IRQHandler /* USBFS Wake Up */
|
||||
.weak ETH_IRQHandler /* ETH global */
|
||||
.weak ETHWakeUp_IRQHandler /* ETHWakeUp */
|
||||
.weak TIM5_IRQHandler /* TIM5 */
|
||||
@@ -205,8 +205,8 @@ USART3_IRQHandler:
|
||||
EXTI15_10_IRQHandler:
|
||||
RTCAlarm_IRQHandler:
|
||||
USBWakeUp_IRQHandler:
|
||||
USBHD_IRQHandler:
|
||||
USBHDWakeUp_IRQHandler:
|
||||
USBFS_IRQHandler:
|
||||
USBFSWakeUp_IRQHandler:
|
||||
ETH_IRQHandler:
|
||||
ETHWakeUp_IRQHandler:
|
||||
TIM5_IRQHandler:
|
||||
|
||||
@@ -81,8 +81,8 @@ _vector_base:
|
||||
.word EXTI15_10_IRQHandler /* EXTI Line 15..10 */
|
||||
.word RTCAlarm_IRQHandler /* RTC Alarm through EXTI Line */
|
||||
.word USBWakeUp_IRQHandler /* USB Wake up from suspend */
|
||||
.word USBHD_IRQHandler /* USBHD Break */
|
||||
.word USBHDWakeUp_IRQHandler /* USBHD Wake up from suspend */
|
||||
.word USBFS_IRQHandler /* USBFS Break */
|
||||
.word USBFSWakeUp_IRQHandler /* USBFS Wake up from suspend */
|
||||
.word ETH_IRQHandler /* ETH global */
|
||||
.word ETHWakeUp_IRQHandler /* ETH Wake up */
|
||||
.word BB_IRQHandler /* BLE BB */
|
||||
@@ -145,8 +145,8 @@ _vector_base:
|
||||
.weak EXTI15_10_IRQHandler /* EXTI Line 15..10 */
|
||||
.weak RTCAlarm_IRQHandler /* RTC Alarm through EXTI Line */
|
||||
.weak USBWakeUp_IRQHandler /* USB Wakeup from suspend */
|
||||
.weak USBHD_IRQHandler /* USBHD */
|
||||
.weak USBHDWakeUp_IRQHandler /* USBHD Wake Up */
|
||||
.weak USBFS_IRQHandler /* USBFS */
|
||||
.weak USBFSWakeUp_IRQHandler /* USBFS Wake Up */
|
||||
.weak ETH_IRQHandler /* ETH global */
|
||||
.weak ETHWakeUp_IRQHandler /* ETHWakeUp */
|
||||
.weak BB_IRQHandler /* BLE BB */
|
||||
@@ -207,8 +207,8 @@ USART3_IRQHandler:
|
||||
EXTI15_10_IRQHandler:
|
||||
RTCAlarm_IRQHandler:
|
||||
USBWakeUp_IRQHandler:
|
||||
USBHD_IRQHandler:
|
||||
USBHDWakeUp_IRQHandler:
|
||||
USBFS_IRQHandler:
|
||||
USBFSWakeUp_IRQHandler:
|
||||
ETH_IRQHandler:
|
||||
ETHWakeUp_IRQHandler:
|
||||
BB_IRQHandler:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* File Name : ch32v20x_it.c
|
||||
* Author : WCH
|
||||
* Version : V1.0.0
|
||||
* Date : 2021/06/06
|
||||
* Date : 2023/12/29
|
||||
* Description : Main Interrupt Service Routines.
|
||||
*********************************************************************************
|
||||
* Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
|
||||
@@ -23,6 +23,9 @@ void HardFault_Handler(void) __attribute__((interrupt()));
|
||||
*/
|
||||
void NMI_Handler(void)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
|
||||
@@ -111,10 +111,10 @@ static void SetSysClockTo144_HSI( void );
|
||||
void SystemInit (void)
|
||||
{
|
||||
RCC->CTLR |= (uint32_t)0x00000001;
|
||||
RCC->CFGR0 &= (uint32_t)0xF8FF0000;
|
||||
RCC->CFGR0 &= (uint32_t)0xF0FF0000;
|
||||
RCC->CTLR &= (uint32_t)0xFEF6FFFF;
|
||||
RCC->CTLR &= (uint32_t)0xFFFBFFFF;
|
||||
RCC->CFGR0 &= (uint32_t)0xFF80FFFF;
|
||||
RCC->CFGR0 &= (uint32_t)0xFF00FFFF;
|
||||
RCC->INTR = 0x009F0000;
|
||||
SetSysClock();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user