cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F429I USART problem

stef
Associate
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.
4 REPLIES 4
Posted on March 19, 2016 at 00:29

I guess I'd focus on the external connectivity, that it is correct, and there isn't any different connectivity, or solder bridges on the DISC1 design.

Look at the signals with a scope, and consider looping the TX back into the RX, and sending a continuous stream of 'U's

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on March 19, 2016 at 01:02

Yes, review the solder bridges, Table 5

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/user_manual/DM00093903.pdf

With the VCP attached, it is going to clash with other uses you might have.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
stef
Associate
Posted on March 19, 2016 at 20:23

Thank you for your fast answer. So I have to use another USART? Or is there any way how to disable it?

Posted on March 19, 2016 at 21:53

Or is there any way how to disable it?

Solder, desolder, the bridges as appropriate, I don't think you can alter the behaviour of the firmware.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..