初始化继电器拉低

This commit is contained in:
王绪洁 2025-02-19 13:28:02 +08:00
parent 669b31141d
commit 0727de752b
7 changed files with 306 additions and 46 deletions

View File

@ -102,6 +102,14 @@ void Error_Handler(void);
#define LED_Y_GPIO_Port GPIOE #define LED_Y_GPIO_Port GPIOE
#define DO_EN_Pin GPIO_PIN_10 #define DO_EN_Pin GPIO_PIN_10
#define DO_EN_GPIO_Port GPIOB #define DO_EN_GPIO_Port GPIOB
#define RELAY_1_Pin GPIO_PIN_14
#define RELAY_1_GPIO_Port GPIOB
#define RELAY_2_Pin GPIO_PIN_15
#define RELAY_2_GPIO_Port GPIOB
#define RELAY_3_Pin GPIO_PIN_8
#define RELAY_3_GPIO_Port GPIOD
#define RELAY_4_Pin GPIO_PIN_9
#define RELAY_4_GPIO_Port GPIOD
#define DO_CH1_Pin GPIO_PIN_10 #define DO_CH1_Pin GPIO_PIN_10
#define DO_CH1_GPIO_Port GPIOD #define DO_CH1_GPIO_Port GPIOD
#define DO_CH2_Pin GPIO_PIN_11 #define DO_CH2_Pin GPIO_PIN_11

View File

@ -61,6 +61,12 @@ void MX_GPIO_Init(void)
/*Configure GPIO pin Output Level */ /*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(LED_Y_GPIO_Port, LED_Y_Pin, GPIO_PIN_SET); HAL_GPIO_WritePin(LED_Y_GPIO_Port, LED_Y_Pin, GPIO_PIN_SET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOB, RELAY_1_Pin|RELAY_2_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOD, RELAY_3_Pin|RELAY_4_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */ /*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOD, DO_CH1_Pin|DO_CH2_Pin|DO_CH3_Pin|DO_CH4_Pin HAL_GPIO_WritePin(GPIOD, DO_CH1_Pin|DO_CH2_Pin|DO_CH3_Pin|DO_CH4_Pin
|DO_CH5_Pin|DO_CH6_Pin|DO_CH13_Pin|DO_CH14_Pin |DO_CH5_Pin|DO_CH6_Pin|DO_CH13_Pin|DO_CH14_Pin
@ -84,8 +90,10 @@ void MX_GPIO_Init(void)
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_MEDIUM; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_MEDIUM;
HAL_GPIO_Init(ETH_RESET_GPIO_Port, &GPIO_InitStruct); HAL_GPIO_Init(ETH_RESET_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pins : PBPin PBPin PBPin */ /*Configure GPIO pins : PBPin PBPin PBPin PBPin
GPIO_InitStruct.Pin = LED_R_Pin|LED_G_Pin|DO_EN_Pin; PBPin */
GPIO_InitStruct.Pin = LED_R_Pin|LED_G_Pin|DO_EN_Pin|RELAY_1_Pin
|RELAY_2_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
@ -100,10 +108,10 @@ void MX_GPIO_Init(void)
/*Configure GPIO pins : PDPin PDPin PDPin PDPin /*Configure GPIO pins : PDPin PDPin PDPin PDPin
PDPin PDPin PDPin PDPin PDPin PDPin PDPin PDPin
PDPin PDPin */ PDPin PDPin PDPin PDPin */
GPIO_InitStruct.Pin = DO_CH1_Pin|DO_CH2_Pin|DO_CH3_Pin|DO_CH4_Pin GPIO_InitStruct.Pin = RELAY_3_Pin|RELAY_4_Pin|DO_CH1_Pin|DO_CH2_Pin
|DO_CH5_Pin|DO_CH6_Pin|DO_CH13_Pin|DO_CH14_Pin |DO_CH3_Pin|DO_CH4_Pin|DO_CH5_Pin|DO_CH6_Pin
|DO_CH15_Pin|DO_CH16_Pin; |DO_CH13_Pin|DO_CH14_Pin|DO_CH15_Pin|DO_CH16_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;

View File

@ -61,7 +61,7 @@ void MX_LWIP_Init(void)
IP_ADDRESS[0] = 192; IP_ADDRESS[0] = 192;
IP_ADDRESS[1] = 168; IP_ADDRESS[1] = 168;
IP_ADDRESS[2] = 1; IP_ADDRESS[2] = 1;
IP_ADDRESS[3] = 100; IP_ADDRESS[3] = 101;
NETMASK_ADDRESS[0] = 255; NETMASK_ADDRESS[0] = 255;
NETMASK_ADDRESS[1] = 255; NETMASK_ADDRESS[1] = 255;
NETMASK_ADDRESS[2] = 255; NETMASK_ADDRESS[2] = 255;
@ -69,7 +69,7 @@ void MX_LWIP_Init(void)
GATEWAY_ADDRESS[0] = 192; GATEWAY_ADDRESS[0] = 192;
GATEWAY_ADDRESS[1] = 168; GATEWAY_ADDRESS[1] = 168;
GATEWAY_ADDRESS[2] = 1; GATEWAY_ADDRESS[2] = 1;
GATEWAY_ADDRESS[3] = 29; GATEWAY_ADDRESS[3] = 27;
/* USER CODE BEGIN IP_ADDRESSES */ /* USER CODE BEGIN IP_ADDRESSES */
/* USER CODE END IP_ADDRESSES */ /* USER CODE END IP_ADDRESSES */

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<component_viewer schemaVersion="0.1" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="Component_Viewer.xsd">
<component name="EventRecorderStub" version="1.0.0"/> <!--name and version of the component-->
<events>
</events>
</component_viewer>

View File

@ -117,6 +117,26 @@
<pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon> <pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon>
</DebugOpt> </DebugOpt>
<TargetDriverDllRegistry> <TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMRTXEVENTFLAGS</Key>
<Name>-L70 -Z18 -C0 -M0 -T1</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGTARM</Key>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMDBGFLAGS</Key>
<Name></Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGUARM</Key>
<Name>(105=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry> <SetRegEntry>
<Number>0</Number> <Number>0</Number>
<Key>UL2CM3</Key> <Key>UL2CM3</Key>
@ -125,10 +145,17 @@
<SetRegEntry> <SetRegEntry>
<Number>0</Number> <Number>0</Number>
<Key>ST-LINKIII-KEIL_SWO</Key> <Key>ST-LINKIII-KEIL_SWO</Key>
<Name>-U-O142 -O2254 -S0 -C0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F4xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F407VGTx$CMSIS\Flash\STM32F4xx_1024.FLM)</Name> <Name>-U-O142 -O2254 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(2BA01477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F4xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F407VGTx$CMSIS\Flash\STM32F4xx_1024.FLM)</Name>
</SetRegEntry> </SetRegEntry>
</TargetDriverDllRegistry> </TargetDriverDllRegistry>
<Breakpoint/> <Breakpoint/>
<WatchWindow1>
<Ww>
<count>0</count>
<WinNumber>1</WinNumber>
<ItemText>user_communication_di</ItemText>
</Ww>
</WatchWindow1>
<Tracepoint> <Tracepoint>
<THDelay>0</THDelay> <THDelay>0</THDelay>
</Tracepoint> </Tracepoint>

View File

@ -0,0 +1,183 @@
<html>
<body>
<pre>
<h1>µVision Build Log</h1>
<h2>Tool Versions:</h2>
IDE-Version: ¦ÌVision V5.36.0.0
Copyright (C) 2021 ARM Ltd and ARM Germany GmbH. All rights reserved.
License Information: aaa Administrator, aaa, LIC=6XJT4-F8J98-8YUVV-P833R-DBAKX-Y8EU6
Tool Versions:
Toolchain: MDK-ARM Professional Version: 5.36.0.0
Toolchain Path: C:\Keil_v5\ARM\ARMCC\Bin
C Compiler: Armcc.exe V5.06 update 7 (build 960)
Assembler: Armasm.exe V5.06 update 7 (build 960)
Linker/Locator: ArmLink.exe V5.06 update 7 (build 960)
Library Manager: ArmAr.exe V5.06 update 7 (build 960)
Hex Converter: FromElf.exe V5.06 update 7 (build 960)
CPU DLL: SARMCM3.DLL V5.36.0.0
Dialog DLL: DCM.DLL V1.17.3.0
Target DLL: STLink\ST-LINKIII-KEIL_SWO.dll V3.0.9.0
Dialog DLL: TCM.DLL V1.53.0.0
<h2>Project:</h2>
D:\WORK\positioner_testing\Remote dido unit\MDK-ARM\remote_dido_unit.uvprojx
Project File Date: 02/19/2025
<h2>Output:</h2>
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'remote_dido_unit'
assembling startup_stm32f407xx.s...
compiling lan8742.c...
compiling gpio.c...
compiling freertos.c...
compiling stm32f4xx_hal_msp.c...
compiling stm32f4xx_hal_flash.c...
compiling stm32f4xx_hal_flash_ex.c...
compiling tim.c...
compiling stm32f4xx_hal_rcc_ex.c...
compiling stm32f4xx_it.c...
compiling stm32f4xx_hal_rcc.c...
compiling main.c...
compiling lwip.c...
compiling ethernetif.c...
compiling stm32f4xx_hal_timebase_tim.c...
compiling stm32f4xx_hal_gpio.c...
compiling stm32f4xx_hal_flash_ramfunc.c...
compiling list.c...
compiling croutine.c...
compiling event_groups.c...
compiling queue.c...
compiling stm32f4xx_hal_dma_ex.c...
compiling stm32f4xx_hal_pwr.c...
compiling stm32f4xx_hal_dma.c...
compiling stm32f4xx_hal_exti.c...
compiling stm32f4xx_hal_pwr_ex.c...
compiling stm32f4xx_hal_cortex.c...
compiling stm32f4xx_hal.c...
compiling timers.c...
compiling stm32f4xx_hal_eth.c...
compiling system_stm32f4xx.c...
compiling stream_buffer.c...
compiling stm32f4xx_hal_tim_ex.c...
compiling tasks.c...
compiling heap_4.c...
compiling stm32f4xx_hal_tim.c...
compiling cmsis_os.c...
compiling port.c...
compiling chap-md5.c...
compiling ccp.c...
compiling demand.c...
compiling chap_ms.c...
compiling eui64.c...
compiling chap-new.c...
compiling eap.c...
compiling ipcp.c...
compiling fsm.c...
compiling auth.c...
compiling ipv6cp.c...
compiling lcp.c...
compiling magic.c...
compiling mppe.c...
compiling multilink.c...
compiling ppp.c...
compiling pppapi.c...
compiling pppcrypt.c...
compiling pppoe.c...
compiling pppos.c...
compiling upap.c...
compiling pppol2tp.c...
compiling utils.c...
compiling vj.c...
compiling bridgeif_fdb.c...
compiling ethernet.c...
compiling bridgeif.c...
compiling lowpan6.c...
compiling lowpan6_common.c...
compiling lowpan6_ble.c...
compiling api_msg.c...
compiling zepif.c...
compiling ecp.c...
compiling if_api.c...
compiling netdb.c...
compiling netbuf.c...
compiling err.c...
compiling api_lib.c...
compiling slipif.c...
compiling netifapi.c...
compiling altcp.c...
compiling tcpip.c...
compiling altcp_alloc.c...
compiling sockets.c...
compiling altcp_tcp.c...
compiling dns.c...
compiling def.c...
compiling ip.c...
compiling inet_chksum.c...
compiling mem.c...
compiling init.c...
compiling memp.c...
compiling raw.c...
compiling stats.c...
compiling sys.c...
compiling netif.c...
compiling pbuf.c...
compiling tcp.c...
compiling tcp_in.c...
compiling udp.c...
compiling tcp_out.c...
compiling autoip.c...
compiling dhcp.c...
compiling timeouts.c...
compiling icmp.c...
compiling igmp.c...
compiling etharp.c...
compiling ip4_addr.c...
compiling ip4.c...
compiling ethip6.c...
compiling ip4_frag.c...
compiling dhcp6.c...
compiling communication_protocol.c...
compiling user_lib.c...
compiling icmp6.c...
compiling inet6.c...
compiling ip6_addr.c...
compiling ip6.c...
compiling nd6.c...
compiling ip6_frag.c...
compiling mld6.c...
compiling sys_arch.c...
compiling leds.c...
compiling tcpserverc.c...
compiling mqtt.c...
compiling user_gpio.c...
linking...
Program Size: Code=74336 RO-data=1344 RW-data=408 ZI-data=51600
"remote_dido_unit\remote_dido_unit.axf" - 0 Error(s), 0 Warning(s).
<h2>Software Packages used:</h2>
Package Vendor: ARM
http://www.keil.com/pack/ARM.CMSIS.5.8.0.pack
ARM.CMSIS.5.8.0
CMSIS (Common Microcontroller Software Interface Standard)
* Component: CORE Version: 5.5.0
Package Vendor: Keil
http://www.keil.com/pack/Keil.STM32F4xx_DFP.2.12.0.pack
Keil.STM32F4xx_DFP.2.12.0
STMicroelectronics STM32F4 Series Device Support, Drivers and Examples
<h2>Collection of Component include folders:</h2>
.\RTE\_remote_dido_unit
C:\Users\Administrator\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
C:\Users\Administrator\AppData\Local\Arm\Packs\Keil\STM32F4xx_DFP\2.12.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include
<h2>Collection of Component Files used:</h2>
* Component: ARM::CMSIS:CORE:5.5.0
Include file: CMSIS\Core\Include\tz_context.h
Build Time Elapsed: 00:00:06
</pre>
</body>
</html>

View File

@ -15,9 +15,9 @@ GPIO.groupedBy=Group By Peripherals
KeepUserPlacement=false KeepUserPlacement=false
LWIP.BSP.number=1 LWIP.BSP.number=1
LWIP.CMSIS_VERSION-Enabled=1 LWIP.CMSIS_VERSION-Enabled=1
LWIP.GATEWAY_ADDRESS=192.168.001.029 LWIP.GATEWAY_ADDRESS=192.168.001.027
LWIP.IPParameters=LWIP_DHCP,IP_ADDRESS,NETMASK_ADDRESS,GATEWAY_ADDRESS,LWIP_UDP,CMSIS_VERSION-Enabled LWIP.IPParameters=LWIP_DHCP,IP_ADDRESS,NETMASK_ADDRESS,GATEWAY_ADDRESS,LWIP_UDP,CMSIS_VERSION-Enabled
LWIP.IP_ADDRESS=192.168.001.100 LWIP.IP_ADDRESS=192.168.001.101
LWIP.LWIP_DHCP=0 LWIP.LWIP_DHCP=0
LWIP.LWIP_UDP=0 LWIP.LWIP_UDP=0
LWIP.NETMASK_ADDRESS=255.255.255.000 LWIP.NETMASK_ADDRESS=255.255.255.000
@ -59,48 +59,52 @@ Mcu.Pin18=PB11
Mcu.Pin19=PB12 Mcu.Pin19=PB12
Mcu.Pin2=PE4 Mcu.Pin2=PE4
Mcu.Pin20=PB13 Mcu.Pin20=PB13
Mcu.Pin21=PD10 Mcu.Pin21=PB14
Mcu.Pin22=PD11 Mcu.Pin22=PB15
Mcu.Pin23=PD12 Mcu.Pin23=PD8
Mcu.Pin24=PD13 Mcu.Pin24=PD9
Mcu.Pin25=PD14 Mcu.Pin25=PD10
Mcu.Pin26=PD15 Mcu.Pin26=PD11
Mcu.Pin27=PC9 Mcu.Pin27=PD12
Mcu.Pin28=PA8 Mcu.Pin28=PD13
Mcu.Pin29=PA11 Mcu.Pin29=PD14
Mcu.Pin3=PE5 Mcu.Pin3=PE5
Mcu.Pin30=PA12 Mcu.Pin30=PD15
Mcu.Pin31=PA13 Mcu.Pin31=PC9
Mcu.Pin32=PA14 Mcu.Pin32=PA8
Mcu.Pin33=PA15 Mcu.Pin33=PA11
Mcu.Pin34=PC12 Mcu.Pin34=PA12
Mcu.Pin35=PD0 Mcu.Pin35=PA13
Mcu.Pin36=PD1 Mcu.Pin36=PA14
Mcu.Pin37=PD2 Mcu.Pin37=PA15
Mcu.Pin38=PD3 Mcu.Pin38=PC12
Mcu.Pin39=PD4 Mcu.Pin39=PD0
Mcu.Pin4=PE6 Mcu.Pin4=PE6
Mcu.Pin40=PD5 Mcu.Pin40=PD1
Mcu.Pin41=PD6 Mcu.Pin41=PD2
Mcu.Pin42=PD7 Mcu.Pin42=PD3
Mcu.Pin43=PB3 Mcu.Pin43=PD4
Mcu.Pin44=PB4 Mcu.Pin44=PD5
Mcu.Pin45=PB5 Mcu.Pin45=PD6
Mcu.Pin46=PB6 Mcu.Pin46=PD7
Mcu.Pin47=PB7 Mcu.Pin47=PB3
Mcu.Pin48=PE0 Mcu.Pin48=PB4
Mcu.Pin49=PE1 Mcu.Pin49=PB5
Mcu.Pin5=PH0-OSC_IN Mcu.Pin5=PH0-OSC_IN
Mcu.Pin50=VP_FREERTOS_VS_CMSIS_V1 Mcu.Pin50=PB6
Mcu.Pin51=VP_LWIP_VS_Enabled Mcu.Pin51=PB7
Mcu.Pin52=VP_SYS_VS_tim1 Mcu.Pin52=PE0
Mcu.Pin53=VP_TIM2_VS_ClockSourceINT Mcu.Pin53=PE1
Mcu.Pin54=VP_TIM3_VS_ClockSourceINT Mcu.Pin54=VP_FREERTOS_VS_CMSIS_V1
Mcu.Pin55=VP_LWIP_VS_Enabled
Mcu.Pin56=VP_SYS_VS_tim1
Mcu.Pin57=VP_TIM2_VS_ClockSourceINT
Mcu.Pin58=VP_TIM3_VS_ClockSourceINT
Mcu.Pin6=PH1-OSC_OUT Mcu.Pin6=PH1-OSC_OUT
Mcu.Pin7=PC0 Mcu.Pin7=PC0
Mcu.Pin8=PC1 Mcu.Pin8=PC1
Mcu.Pin9=PA1 Mcu.Pin9=PA1
Mcu.PinsNb=55 Mcu.PinsNb=59
Mcu.ThirdPartyNb=0 Mcu.ThirdPartyNb=0
Mcu.UserConstants= Mcu.UserConstants=
Mcu.UserName=STM32F407VGTx Mcu.UserName=STM32F407VGTx
@ -177,6 +181,16 @@ PB12.Mode=RMII
PB12.Signal=ETH_TXD0 PB12.Signal=ETH_TXD0
PB13.Mode=RMII PB13.Mode=RMII
PB13.Signal=ETH_TXD1 PB13.Signal=ETH_TXD1
PB14.GPIOParameters=GPIO_Speed,GPIO_Label
PB14.GPIO_Label=RELAY_1
PB14.GPIO_Speed=GPIO_SPEED_FREQ_VERY_HIGH
PB14.Locked=true
PB14.Signal=GPIO_Output
PB15.GPIOParameters=GPIO_Speed,GPIO_Label
PB15.GPIO_Label=RELAY_2
PB15.GPIO_Speed=GPIO_SPEED_FREQ_VERY_HIGH
PB15.Locked=true
PB15.Signal=GPIO_Output
PB2.GPIOParameters=GPIO_Speed,PinState,GPIO_Label PB2.GPIOParameters=GPIO_Speed,PinState,GPIO_Label
PB2.GPIO_Label=LED_G PB2.GPIO_Label=LED_G
PB2.GPIO_Speed=GPIO_SPEED_FREQ_VERY_HIGH PB2.GPIO_Speed=GPIO_SPEED_FREQ_VERY_HIGH
@ -312,6 +326,17 @@ PD7.GPIO_Label=DI_CH4
PD7.GPIO_PuPd=GPIO_PULLUP PD7.GPIO_PuPd=GPIO_PULLUP
PD7.Locked=true PD7.Locked=true
PD7.Signal=GPIO_Input PD7.Signal=GPIO_Input
PD8.GPIOParameters=GPIO_Speed,GPIO_Label
PD8.GPIO_Label=RELAY_3
PD8.GPIO_Speed=GPIO_SPEED_FREQ_VERY_HIGH
PD8.Locked=true
PD8.Signal=GPIO_Output
PD9.GPIOParameters=GPIO_Speed,PinState,GPIO_Label
PD9.GPIO_Label=RELAY_4
PD9.GPIO_Speed=GPIO_SPEED_FREQ_VERY_HIGH
PD9.Locked=true
PD9.PinState=GPIO_PIN_RESET
PD9.Signal=GPIO_Output
PE0.GPIOParameters=GPIO_PuPd,GPIO_Label PE0.GPIOParameters=GPIO_PuPd,GPIO_Label
PE0.GPIO_Label=DI_CH10 PE0.GPIO_Label=DI_CH10
PE0.GPIO_PuPd=GPIO_PULLUP PE0.GPIO_PuPd=GPIO_PULLUP