AnsweredAssumed Answered

Am I right for configure the UART?

Question asked by fairchild.brian on Jul 6, 2014
Latest reply on Aug 6, 2014 by Amel N
Hi guys,
I tried to make a project by STM32CubeMX. I configured the MCU and the Project file is this (USART.ioc) :

#MicroXplorer Configuration settings - do not modify
#Sun Jul 06 17:52:14 IRDT 2014
File.Version=4
KeepUserPlacement=false
Mcu.Family=STM32F0
Mcu.IP0=NVIC
Mcu.IP1=RCC
Mcu.IP2=USART1
Mcu.IPNb=3
Mcu.Name=STM32F030F4Px
Mcu.Package=TSSOP20
Mcu.Pin0=PF0-OSC_IN
Mcu.Pin1=PF1-OSC_OUT
Mcu.Pin2=PA0
Mcu.Pin3=PA2
Mcu.Pin4=PA3
Mcu.PinsNb=5
Mcu.UserName=STM32F030F4Px
NVIC.EXTI0_1_IRQn=true\:0\:0
NVIC.SysTick_IRQn=true\:0\:0
NVIC.USART1_IRQn=true\:0\:0
PA0.GPIOParameters=GPIO_PuPd,GPIO_ModeDefaultEXTI
PA0.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING
PA0.GPIO_PuPd=GPIO_PULLDOWN
PA0.Locked=true
PA0.Signal=GPXTI0
PA2.Mode=Asynchronous
PA2.Signal=USART1_TX
PA3.Mode=Asynchronous
PA3.Signal=USART1_RX
PCC.Family=STM32F0
PCC.MCU=STM32F030F4Px
PCC.MXVersion=4.3.0
PCC.PartNumber=STM32F030F4Px
PCC.Seq0=0
PCC.SubFamily=STM32F030 Value Line
PCC.Temperature=25
PCC.Vdd=3.6
PF0-OSC_IN.Mode=HSE-External-Oscillator
PF0-OSC_IN.Signal=RCC_OSC_IN
PF1-OSC_OUT.Mode=HSE-External-Oscillator
PF1-OSC_OUT.Signal=RCC_OSC_OUT
ProjectManager.AskForMigrate=true
ProjectManager.BackupPrevious=false
ProjectManager.CompilerOptimize=2
ProjectManager.ComputerToolchain=false
ProjectManager.CoupleFile=false
ProjectManager.DeletePrevious=true
ProjectManager.DeviceId=STM32F030F4Px
ProjectManager.FirmwarePackage=STM32Cube FW_F0 V1.0.0
ProjectManager.FreePins=false
ProjectManager.HalAssertFull=false
ProjectManager.KeepUserCode=true
ProjectManager.LastFirmware=true
ProjectManager.LibraryCopy=0
ProjectManager.ProjectBuild=false
ProjectManager.ProjectFileName=USART.ioc
ProjectManager.ProjectName=USART
ProjectManager.TargetToolchain=MDK-ARM 4.73
RCC.FamilyName=M
RCC.IPParameters=PLLSource,PLLMUL,FamilyName,SYSCLKSource
RCC.PLLMUL=RCC_PLL_MUL6
RCC.PLLSource=RCC_PLLSOURCE_HSE
RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK
SH.GPXTI0.0=GPIO_EXTI0
SH.GPXTI0.ConfNb=1
USART1.BaudRate-Asynchronous=921600
USART1.IPParameters=BaudRate-Asynchronous

Am I right?
I want to use interrupte for send and recive the data.
my next question is:
after configure the peripherals and MCU via STM32CubeMX, should I configure the project files manualy? I want to use the functions (or APIs) of UART header file but I don't know how!
for example, should I use these both functions?:

HAL_StatusTypeDef HAL_UART_Transmit_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);
HAL_StatusTypeDef HAL_UART_Receive_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);

How can I use those functions? should I handle anything?

Outcomes