1995 views|3 replies

4

Posts

0

Resources
The OP
 

Processing of default settings after GPIO power-on of HUADA MCU [Copy link]

 

How to solve the problem that a pin of the Huada MCU always outputs a high-level pulse after power-on reset/hardware reset.
Check the Huada MCU manual. After power-on or hardware reset, the GPIO pin should be in the mode of "input, output register is uncertain".
The manual clearly states the setting of "input, output register is uncertain" for the following two registers.


But in actual use, look at the status of the two registers through keil debug:

324.zip (263.77 KB, downloads: )


The above two registers are the values observed by the breakpoint when the program runs to the _HidePinInit function in the system_hc32l110.c file.


So on the P35 pin, there is a short high-level pulse after the hardware is restarted.

It is recommended to make sure the pin status of each GPIO on our board is clear, and it is best to configure the status of all GPIOs clearly when the program is just started.
It is recommended to set it in the _HidePinInit function in the system_hc32xxx.c file so that the chip has a clear GPIO status when it starts to avoid similar problems.

This post is from Domestic Chip Exchange

Latest reply

The default state of the pin may affect the state of the peripherals, so it must be set before powering on, including output and input.   Details Published on 2021-11-16 11:17
 
 

1942

Posts

2

Resources
2
 

Indeed, the default state of the pins may affect the state of the peripherals, and it is good to know the state of the GPIO at reset!

This post is from Domestic Chip Exchange
 
 
 

7462

Posts

2

Resources
3
 

It is true that if the initial IO is not controlled properly, the externally controlled device may be destroyed.

This post is from Domestic Chip Exchange
Personal signature

默认摸鱼,再摸鱼。2022、9、28

 
 
 

49

Posts

0

Resources
4
 

The default state of the pin may affect the state of the peripherals, so it must be set before powering on, including output and input.

This post is from Domestic Chip Exchange
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list