Arm-based 32-bit cortex-m4f mcu, 64 to 256 kb flash, slib, 15 timers, 1 adc, 18 communication interfaces (can and otgfs) (513 pages)
Summary of Contents for ARTERY AT32F421
Page 1
GPIO and IOMUX section in the reference manual of AT32F421 The code in this application note is based on Artery’s V2.x.x BSP (the version of board support Note: package). When in use, attention should be paid to the differences regarding to the versions of BSP.
AT32F421 GPIO user guide Contents GPIO features ......................5 GPIO ........................6 GPIO toggle ......................8 5V-tolerant or 3V-tolerant IO ..................8 Standard 3.3V-tolerant pins (TC) ................. 8 5V-tolerant pin with analog function (FTa) ..............8 5V-tolerant pin (FT) ...................... 9 IOMUX ........................
Page 3
AT32F421 GPIO user guide List of tables Table 1. I/O port bit configuration table ....................7 Table 2. TC pin example ........................8 Table 3. FTa pin example ........................9 Table 4. FT pin example........................9 Table 5. Configure port A alternate function by GPIOA_AFR register..........10 Table 6.
Page 4
AT32F421 GPIO user guide List of figures Figure 1. Basic structure of I/O port bit ....................6 Figure 2. I/O toggle speed ........................8 2021.11.29 Rev.2.0.0 www.arterytek.com...
AT32F421 GPIO user guide GPIO features 48-pin package (largest) has 39 multi-function bidirectional I/O ports All I/O ports can be mapped to 16 external interrupt vectors Almost all I/O ports are 5V tolerant (except for 4x OSC/OSC32 pins) ...
AT32F421 GPIO user guide GPIO During and just after reset, the multiplexed functions of GPIOs are not active, and most I/O ports are configured in input floating mode. When configured as output, the value written to the output data register (GPIOx_OPTDT) is output on the I/O pin.
AT32F421 GPIO user guide Table 1. I/O port bit configuration table CFGR[1:0] OMODE ODRVR[1:0] PULL[1:0] configuration GP output GP output GP output Reserved GP output GP output GP output Reserved GP output OD ODRV[1:0] AF output AF output AF output...
AT32F421 GPIO user guide GPIO toggle All I/O ports of AT32F421 series are fast I/Os with control registers accessible at f speed so that the GPIO toggle frequency can reach 60 MHz with ease. Figure 2. I/O toggle speed 5V-tolerant or 3V-tolerant IO Standard 3.3V-tolerant pins (TC)
AT32F421 GPIO user guide Table 3. FTa pin example Pin name Pin name IO structure Multiplexed function Additional function TMR1_ETR / ADC_IN0COMP_INP2 USART2_CTS / COMP_INM6 / /I2C2_SCL / WKUP1 COMP_OUT 5V-tolerant pin (FT) Other GPIOs are all 5V tolerant. Table 4. FT pin example...
AT32F421 GPIO user guide IOMUX I/O multiplexed function input/output Most peripherals share the same GPIO pin (For example, PA0 can be used as TMR1_ETR / USART2_CTS /I2C2_SCL / COMP_OUT) A GPIO pin is connected to only one peripheral at any time.
The following contents are not available in AT32F421 series: Analog switch (power switch) can only allow a small amount of current (3mA), so in output mode, there are some limits on using I/O functions of PC13/PC14/PC15: they can only work in...
AT32F4xx_StdPeriph_Lib_Vx.x.x\Libraries\AT32F4xx_StdPeriph_Driver Note: The AT32F421 series GPIOs use different driver at32f4xx_gpio.c/.h from that of other series. The user should be noted about this when using. Output mode GPIO provides two different types of output modes: push-pull and open-drain. Refer to the following configuration example of output mode.
AT32F421 GPIO user guide Analog mode When the user needs to use ADC or COMP channel as input, it is necessary to configure the corresponding pins as analog mode. Refer to the following configuration example of analog mode. GPIO_InitStructure.GPIO_Pins = GPIO_Pins_x;...
AT32F421 GPIO user guide Revision history Document revision history Table 8. Date Revision Changes 2021.11.29 2.0.0 Initial release 2021.11.29 Rev.2.0.0 www.arterytek.com...
Page 18
No license, express or implied, to any intellectual property rights is granted under this document. If any part of this document deals with any third party products or services, it shall not be deemed a license grant by ARTERY for the use of such third party products or services, or any intellectual property contained therein, or considered as a warranty regarding the use in any manner whatsoever of such third party products or services or any intellectual property contained therein.
Need help?
Do you have a question about the AT32F421 and is the answer not in the manual?
Questions and answers