完善一些引脚的控制
This commit is contained in:
parent
db8eb7ca24
commit
bbf84a1b33
|
@ -5,7 +5,7 @@
|
||||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1422158916725793170" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="835033356658112547" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||||
</provider>
|
</provider>
|
||||||
|
|
|
@ -243,7 +243,6 @@ void test(void)
|
||||||
|
|
||||||
// mppt_constantVoltage();
|
// mppt_constantVoltage();
|
||||||
printf_data();
|
printf_data();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -232,6 +232,9 @@ void hardware_Init(void)
|
||||||
RUN_LED_Init();
|
RUN_LED_Init();
|
||||||
G_FFMOS_CON_Init();
|
G_FFMOS_CON_Init();
|
||||||
WDI_INPUT_Init();
|
WDI_INPUT_Init();
|
||||||
|
BEEP_Init();
|
||||||
|
POW_OUT_CON_Init();
|
||||||
|
DSG_PROT_Init();
|
||||||
SPI_Flash_Init();
|
SPI_Flash_Init();
|
||||||
|
|
||||||
Set_duty_ratio(0.5);
|
Set_duty_ratio(0.5);
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
/* 控制太阳能板导通mos */
|
/* 控制太阳能板导通mos */
|
||||||
|
/* 低电平mos管导通 */
|
||||||
/* G_FFMOS_CON1 --> PA15 */
|
/* G_FFMOS_CON1 --> PA15 */
|
||||||
#define G_FFMOS_CON1_GPIO GPIOA
|
#define G_FFMOS_CON1_GPIO GPIOA
|
||||||
#define G_FFMOS_CON1_PIN GPIO_Pin_15
|
#define G_FFMOS_CON1_PIN GPIO_Pin_15
|
||||||
|
@ -38,6 +39,7 @@ void WDI_INPUT_Init(void);
|
||||||
void BEEP_Init(void);
|
void BEEP_Init(void);
|
||||||
|
|
||||||
/* 控制放电引脚 */
|
/* 控制放电引脚 */
|
||||||
|
/* 低电平关闭 */
|
||||||
/* POW_OUT_CON --> PB8 */
|
/* POW_OUT_CON --> PB8 */
|
||||||
#define POW_OUT_CON_GPIO GPIOB
|
#define POW_OUT_CON_GPIO GPIOB
|
||||||
#define POW_OUT_CON_PIN GPIO_Pin_8
|
#define POW_OUT_CON_PIN GPIO_Pin_8
|
||||||
|
|
|
@ -13,14 +13,16 @@ void G_FFMOS_CON_Init(void)
|
||||||
RCC_PB2PeriphClockCmd(RCC_PB2Periph_GPIOA, ENABLE);
|
RCC_PB2PeriphClockCmd(RCC_PB2Periph_GPIOA, ENABLE);
|
||||||
GPIO_InitTypeDef GPIO_InitStructure;
|
GPIO_InitTypeDef GPIO_InitStructure;
|
||||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_15;
|
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_15;
|
||||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //推挽输出
|
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //推挽输出
|
||||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
||||||
GPIO_Init(GPIOA, &GPIO_InitStructure);
|
GPIO_Init(GPIOA, &GPIO_InitStructure);
|
||||||
|
GPIO_WriteBit(GPIOA, GPIO_Pin_15, RESET); //关闭mos管,打开光伏输入
|
||||||
|
|
||||||
/* G_FFMOS_CON2 --> PB3 */
|
/* G_FFMOS_CON2 --> PB3 */
|
||||||
RCC_PB2PeriphClockCmd(RCC_PB2Periph_GPIOB, ENABLE);
|
RCC_PB2PeriphClockCmd(RCC_PB2Periph_GPIOB, ENABLE);
|
||||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_3;
|
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_3;
|
||||||
GPIO_Init(GPIOB, &GPIO_InitStructure);
|
GPIO_Init(GPIOB, &GPIO_InitStructure);
|
||||||
|
GPIO_WriteBit(GPIOB, GPIO_Pin_3, RESET);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RUN_LED_Init(void)
|
void RUN_LED_Init(void)
|
||||||
|
@ -94,6 +96,7 @@ void EXTI2_IRQHandler(void)
|
||||||
{
|
{
|
||||||
if(EXTI_GetITStatus(EXTI_Line2)==SET) { //EXTI_GetITStatus用来获取中断标志位状态,如果EXTI线产生中断则返回SET,否则返回RESET
|
if(EXTI_GetITStatus(EXTI_Line2)==SET) { //EXTI_GetITStatus用来获取中断标志位状态,如果EXTI线产生中断则返回SET,否则返回RESET
|
||||||
printf("Run at EXTI\r\n");
|
printf("Run at EXTI\r\n");
|
||||||
|
GPIO_WriteBit(DSG_PROT_GPIO, DSG_PROT_PIN, RESET);
|
||||||
EXTI_ClearITPendingBit(EXTI_Line2); //清除中断标志位
|
EXTI_ClearITPendingBit(EXTI_Line2); //清除中断标志位
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,88 +1,86 @@
|
||||||
Hardware/src/gpio.o: ../Hardware/src/gpio.c \
|
Hardware/src/gpio.o: ../Hardware/src/gpio.c \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Hardware\inc/gpio.h \
|
D:\psx\MPPT\git\Hardware\inc/gpio.h D:\psx\MPPT\git\Debug/debug.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Debug/debug.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103.h \
|
D:\psx\MPPT\git\Core/core_riscv.h D:\psx\MPPT\git\User/system_ch32l103.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Core/core_riscv.h \
|
D:\psx\MPPT\git\User/ch32l103_conf.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\User/system_ch32l103.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_adc.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\User/ch32l103_conf.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_adc.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_bkp.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_can.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_bkp.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_crc.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_can.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_dbgmcu.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_crc.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_dma.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_dbgmcu.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_exti.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_dma.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_flash.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_exti.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_gpio.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_flash.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_i2c.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_gpio.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_iwdg.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_i2c.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_pwr.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_iwdg.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_rcc.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_pwr.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_rtc.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_rcc.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_spi.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_rtc.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_tim.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_spi.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_usart.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_tim.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_wwdg.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_usart.h \
|
D:\psx\MPPT\git\User/ch32l103_it.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_wwdg.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_misc.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\User/ch32l103_it.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_lptim.h \
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_misc.h \
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_opa.h
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_lptim.h \
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_opa.h
|
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Hardware\inc/gpio.h:
|
D:\psx\MPPT\git\Hardware\inc/gpio.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Debug/debug.h:
|
D:\psx\MPPT\git\Debug/debug.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103.h:
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Core/core_riscv.h:
|
D:\psx\MPPT\git\Core/core_riscv.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\User/system_ch32l103.h:
|
D:\psx\MPPT\git\User/system_ch32l103.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\User/ch32l103_conf.h:
|
D:\psx\MPPT\git\User/ch32l103_conf.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_adc.h:
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_adc.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103.h:
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_bkp.h:
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_bkp.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_can.h:
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_can.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_crc.h:
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_crc.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_dbgmcu.h:
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_dbgmcu.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_dma.h:
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_dma.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_exti.h:
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_exti.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_flash.h:
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_flash.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_gpio.h:
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_gpio.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_i2c.h:
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_i2c.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_iwdg.h:
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_iwdg.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_pwr.h:
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_pwr.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_rcc.h:
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_rcc.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_rtc.h:
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_rtc.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_spi.h:
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_spi.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_tim.h:
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_tim.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_usart.h:
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_usart.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_wwdg.h:
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_wwdg.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\User/ch32l103_it.h:
|
D:\psx\MPPT\git\User/ch32l103_it.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_misc.h:
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_misc.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_lptim.h:
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_lptim.h:
|
||||||
|
|
||||||
D:\psx\MPPT\2.software\mppt_Nos_V0.4\Peripheral\inc/ch32l103_opa.h:
|
D:\psx\MPPT\git\Peripheral\inc/ch32l103_opa.h:
|
||||||
|
|
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
20453
obj/mppt_Nos_V0.4.lst
20453
obj/mppt_Nos_V0.4.lst
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue