2007-01-06 07:28 PM
3 uarts tx works on STR910-EVAL but only uart 0 rx work
2011-05-17 12:33 AM
Hi,
Does anyone have a working example using all 3 uarts on the STR910-EVAL board (from ST). Best thing would be a Keil project which is using the ST STR9 library. I've running all 3 uarts tx, but only uart 0 can rx data. Best regards2011-05-17 12:33 AM
My port pin initialisation:
// Gonfigure UART0_Rx pin GPIO5.1 GPIO_InitStructure.GPIO_Direction = GPIO_PinInput; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1; GPIO_InitStructure.GPIO_Type = GPIO_Type_PushPull; GPIO_InitStructure.GPIO_IPConnected = GPIO_IPConnected_Enable; GPIO_InitStructure.GPIO_Alternate = GPIO_InputAlt1; GPIO_Init (GPIO5, &GPIO_InitStructure); // Gonfigure UART0_Tx pin GPIO3.4 GPIO_InitStructure.GPIO_Direction = GPIO_PinInput; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4; GPIO_InitStructure.GPIO_Type = GPIO_Type_PushPull ; GPIO_InitStructure.GPIO_Alternate = GPIO_OutputAlt3 ; GPIO_Init (GPIO3, &GPIO_InitStructure); // Gonfigure UART1_Rx pin GPIO3.2 GPIO_InitStructure.GPIO_Direction = GPIO_PinInput; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2; GPIO_InitStructure.GPIO_Type = GPIO_Type_PushPull; GPIO_InitStructure.GPIO_IPConnected = GPIO_IPConnected_Enable; GPIO_InitStructure.GPIO_Alternate = GPIO_InputAlt1; GPIO_Init (GPIO3, &GPIO_InitStructure); // Gonfigure UART1_Tx pin GPIO3.3 GPIO_InitStructure.GPIO_Direction = GPIO_PinInput; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_3; GPIO_InitStructure.GPIO_Type = GPIO_Type_PushPull ; GPIO_InitStructure.GPIO_Alternate = GPIO_OutputAlt2; GPIO_Init (GPIO3, &GPIO_InitStructure); // Gonfigure UART2_Rx pin GPIO3.1 GPIO_InitStructure.GPIO_Direction = GPIO_PinInput; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1; GPIO_InitStructure.GPIO_Type = GPIO_Type_PushPull; GPIO_InitStructure.GPIO_IPConnected = GPIO_IPConnected_Enable; GPIO_InitStructure.GPIO_Alternate = GPIO_InputAlt1; GPIO_Init (GPIO3, &GPIO_InitStructure); // Gonfigure UART2_Tx pin GPIO3.5 GPIO_InitStructure.GPIO_Direction = GPIO_PinInput; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5; GPIO_InitStructure.GPIO_Type = GPIO_Type_PushPull ; GPIO_InitStructure.GPIO_Alternate = GPIO_OutputAlt3 ; GPIO_Init (GPIO3, &GPIO_InitStructure); Any ideas please ?2011-05-17 12:33 AM
I've found the error, some other gpio-initialisation
destroy the uarts rx configuration.2011-05-17 12:33 AM
Hi Barricade,
Find attached an example using 3 UART (0,1 and 2) similar to the UART example in STlib. I think that the problem is caused by GPIO configuration. ;) In fact, I advise to change the GPIO Direction when transmitting: // Configure UART0_Tx pin GPIO3.4 GPIO_InitStructure.GPIO_Direction = GPIO_PinInput; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4; GPIO_InitStructure.GPIO_Type = GPIO_Type_PushPull ; GPIO_InitStructure.GPIO_Alternate = GPIO_OutputAlt3 ; GPIO_Init (GPIO3, &GPIO_InitStructure); The configuration should be like this: GPIO_InitStructure.GPIO_Direction = GPIO_PinOutput; If you’re using GPIO_DeInit ,try to use only one time at the begin of the GPIO configuration. GPIO_DeInit(GPIO5); GPIO_DeInit(GPIO3); // Configure UART0_Tx pin GPIO3.4 // Configure UART1_Rx pin GPIO3.2 // Configure UART1_Tx pin GPIO3.3 … I hope this can help you. BSRD. :) [ This message was edited by: MBS on 04-01-2007 17:41 ]2011-05-17 12:33 AM
Hi MBS,
thank you for your answer, but I've solved this problem 2 months ago. Another (later) GPIO configuration has overwritten my (before) correct initialization of the GPIO Uart pins. If you would help, look at my other still open posts. Thank you, best regards