Question
STM32F429I USART problem
Posted on March 18, 2016 at 23:11
Hello,
I have STM32F429I-DISCO and STM32F429I-DISC1. I am using same program on that. Sending usart data works great on both, but receiving data on disco usart interrupt work and on disc1 doesn't work...There is my usart config:GPIO_InitTypeDef GPIO_InitDef;
USART_InitTypeDef USART_InitStruct;NVIC_InitTypeDef NVIC_InitDef; RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1, ENABLE);RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE);GPIO_InitDef.GPIO_Pin = GPIO_Pin_9 | GPIO_Pin_10;GPIO_InitDef.GPIO_Mode = GPIO_Mode_AF;GPIO_InitDef.GPIO_OType = GPIO_OType_PP;GPIO_InitDef.GPIO_PuPd = GPIO_PuPd_UP;GPIO_InitDef.GPIO_Speed = GPIO_Speed_100MHz;GPIO_Init(GPIOA, &GPIO_InitDef);GPIO_PinAFConfig(GPIOA, GPIO_PinSource9, GPIO_AF_USART1);GPIO_PinAFConfig(GPIOA, GPIO_PinSource10, GPIO_AF_USART1);USART_InitStruct.USART_BaudRate = 9600;USART_InitStruct.USART_HardwareFlowControl = USART_HardwareFlowControl_None;USART_InitStruct.USART_Mode = USART_Mode_Tx | USART_Mode_Rx;USART_InitStruct.USART_Parity = USART_Parity_No;USART_InitStruct.USART_StopBits = USART_StopBits_1;USART_InitStruct.USART_WordLength = USART_WordLength_8b;USART_Init(USART1, &USART_InitStruct); USART_ITConfig(USART1, USART_IT_RXNE, ENABLE); NVIC_InitDef.NVIC_IRQChannel = USART1_IRQn;NVIC_InitDef.NVIC_IRQChannelCmd = ENABLE;NVIC_InitDef.NVIC_IRQChannelPreemptionPriority = 0;NVIC_InitDef.NVIC_IRQChannelSubPriority = 0;NVIC_Init(&NVIC_InitDef); USART_Cmd(USART1, ENABLE);Do you have any idea where can be the problem? I am finding that a few days and I really don't know.