diff --git a/CW32L012/firmware/SW/BLDC_Hall_PID/MDK/QQT912_L012.uvprojx b/CW32L012/firmware/SW/BLDC_Hall_PID/MDK/QQT912_L012.uvprojx index 114e088..2b9da32 100644 --- a/CW32L012/firmware/SW/BLDC_Hall_PID/MDK/QQT912_L012.uvprojx +++ b/CW32L012/firmware/SW/BLDC_Hall_PID/MDK/QQT912_L012.uvprojx @@ -10,17 +10,44 @@ Target 1 0x4 ARM-ADS + 6090000::V6.9::ARMCLANG + 6090000::V6.9::ARMCLANG + 1 CW32L012C8 WHXY - WHXY.CW32L012_DFP.1.0.0 + WHXY.CW32L012_DFP.1.0.2 IRAM(0x20000000,0x02000) IROM(0x00000000,0x10000) CPUTYPE("Cortex-M0+") CLOCK(64000000) ELITTLE - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0FlashCW32L012_TEST -FS00 -FL010000 -FP0($$Device:CW32L012C8$Flash\FlashCW32L012_TEST.FLM)) + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0FlashCW32L012 -FS00 -FL010000 -FP0($$Device:CW32L012C8$Flash\FlashCW32L012.FLM)) 0 $$Device:CW32L012C8$Device\Include\cw32l012.h + + + + + + + + + + $$Device:CW32L012C8$SVD\CW32L012.sfr + 0 + 0 + + + + + + + 0 + 0 + 0 + 0 + 1 + .\Objects\ QQT912_L012 1 @@ -30,6 +57,40 @@ 1 .\Listings\ 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + 0 + 0 + + 0 + 0 @@ -43,6 +104,8 @@ 0 0 3 + + 1 @@ -75,23 +138,110 @@ 1 BIN\UL2CM3.DLL + + + + + + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 "Cortex-M0+" + + 0 + 0 + 0 1 1 + 0 + 0 + 0 + 0 + 0 + 0 8 1 0 0 + 0 3 3 0 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 1 + 0 + 0 + 0 + 0 1 + 0 + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + 0 0x20000000 @@ -102,31 +252,129 @@ 0x0 0x10000 + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + 1 0x0 0x10000 + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + 0 0x20000000 0x2000 + + 0 + 0x0 + 0x0 + + 1 1 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 2 + 0 + 0 1 + 0 + 0 + 3 + 3 + 1 + 1 + 0 + 0 + 0 + + + ..\..\..\..\MCU_SDK\CW32L012_StandardPeripheralLib_V1.0.3\Libraries\inc;..\USER\inc + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + 1 + 0 + 0 + 0 + 1 + 0 0x00000000 0x20000000 + + + + + + + diff --git a/CW32L012/firmware/SW/BLDC_Hall_PID/USER/src/init.c b/CW32L012/firmware/SW/BLDC_Hall_PID/USER/src/init.c index 6951a3e..dc79af7 100644 --- a/CW32L012/firmware/SW/BLDC_Hall_PID/USER/src/init.c +++ b/CW32L012/firmware/SW/BLDC_Hall_PID/USER/src/init.c @@ -39,7 +39,6 @@ void GPIOInit(void) GPIO_InitStruct.IT = GPIO_IT_NONE; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; - GPIO_InitStruct.Speed = GPIO_SPEED_HIGH; GPIO_InitStruct.Pins = LED_GPIO_PIN; GPIO_Init(LED_GPIO_PORT, &GPIO_InitStruct); diff --git a/CW32L012/firmware/SW/BLDC_Hall_PID/USER/src/main.c b/CW32L012/firmware/SW/BLDC_Hall_PID/USER/src/main.c index 0885e88..5758ed5 100644 --- a/CW32L012/firmware/SW/BLDC_Hall_PID/USER/src/main.c +++ b/CW32L012/firmware/SW/BLDC_Hall_PID/USER/src/main.c @@ -13,8 +13,8 @@ Ported to CW32L012 unsigned int Menu = 0; -#define DEBUG_UARTx CW_UART3 -#define DEBUG_UART_CLK SYSCTRL_APB1_PERIPH_UART3 +#define DEBUG_UARTx CW_UART1 +#define DEBUG_UART_CLK SYSCTRL_APB1_PERIPH_UART1 #define DEBUG_UART_APBClkENx SYSCTRL_APBPeriphClk_Enable1 #define DEBUG_UART_BaudRate 115200 #define DEBUG_UART_UclkFreq 64000000 @@ -25,8 +25,8 @@ unsigned int Menu = 0; #define DEBUG_UART_RX_GPIO_PORT CW_GPIOB #define DEBUG_UART_RX_GPIO_PIN GPIO_PIN_7 -#define DEBUG_UART_AFTX PB06_AFx_UART3TXD() -#define DEBUG_UART_AFRX PB07_AFx_UART3RXD() +#define DEBUG_UART_AFTX PB06_AFx_UART1TXD() +#define DEBUG_UART_AFRX PB07_AFx_UART1RXD() #ifdef __GNUC__ #define PUTCHAR_PROTOTYPE int __io_putchar(int ch) @@ -47,7 +47,6 @@ void UART_Configuration(void) GPIO_InitStructure.Pins = DEBUG_UART_TX_GPIO_PIN; GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP; - GPIO_InitStructure.Speed = GPIO_SPEED_HIGH; GPIO_Init(DEBUG_UART_TX_GPIO_PORT, &GPIO_InitStructure); GPIO_InitStructure.Pins = DEBUG_UART_RX_GPIO_PIN; diff --git a/CW32L012/firmware/SW/BLDC_Hall_PID/USER/src/motor.c b/CW32L012/firmware/SW/BLDC_Hall_PID/USER/src/motor.c index c58cf39..86f905b 100644 --- a/CW32L012/firmware/SW/BLDC_Hall_PID/USER/src/motor.c +++ b/CW32L012/firmware/SW/BLDC_Hall_PID/USER/src/motor.c @@ -25,7 +25,6 @@ void PWMtimer_init(void) GPIO_InitStruct.IT = GPIO_IT_NONE; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pins = GPIO_PIN_13 | GPIO_PIN_14 | GPIO_PIN_15; - GPIO_InitStruct.Speed = GPIO_SPEED_HIGH; GPIO_Init(CW_GPIOB, &GPIO_InitStruct); PWM_AH_OFF; @@ -157,7 +156,6 @@ void Halltimer_init(void) GPIO_InitStruct.IT = GPIO_IT_NONE; GPIO_InitStruct.Mode = GPIO_MODE_INPUT_PULLUP; GPIO_InitStruct.Pins = GPIO_PIN_15 | GPIO_PIN_1; - GPIO_InitStruct.Speed = GPIO_SPEED_HIGH; GPIO_Init(CW_GPIOA, &GPIO_InitStruct); GPIO_InitStruct.Pins = GPIO_PIN_10;