2009-02-26 06:23 PM
UART0 Tx on Port6.7 (Alt 3) Problem
2011-05-17 12:53 AM
I'm using the MCB-STR9 development board and wanted to initialize Port6.7 to utilize UART0 Tx. The documentation says this is possible by way of Alternate Output 3 for Port6 Pin7. After calling GPIO_Init() the chip seems to hang and I lose JTAG communication. The problem turned up in our actual product using the STR912FW44 and I'm able to reproduce the same issue with the MCB-STR9. Anyone heard of this or have any ideas? I can send all sample code if needed.
Thanks in advance, SCU_APBPeriphClockConfig(__UART0, ENABLE); SCU_APBPeriphClockConfig(__GPIO6, ENABLE); SCU_APBPeriphReset(__UART0, DISABLE); SCU_APBPeriphReset(__GPIO6, DISABLE); GPIO_StructInit(&GPIO_InitStructure); GPIO_DeInit(GPIO6); // NOTE: Enabling these causes the chip to hang! // Configure UART0_Tx pin GPIO6.7 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_7; GPIO_InitStructure.GPIO_Direction = GPIO_PinOutput; GPIO_InitStructure.GPIO_Type = GPIO_Type_PushPull; GPIO_InitStructure.GPIO_IPConnected = GPIO_IPConnected_Enable; GPIO_InitStructure.GPIO_Alternate = GPIO_OutputAlt3; GPIO_Init(GPIO6, &GPIO_InitStructure); // Crash!!!2011-05-17 12:53 AM
Hi dbarbarine !
I just have the same problem. Do you have a solution. Please let me know. regards Marc2011-05-17 12:53 AM
I wonder whether the setting below is correct?
GPIO_InitStructure.GPIO_IPConnected = GPIO_IPConnected_Enable;2011-05-17 12:53 AM
Yes lillian_200601!
That's exactly what I had to change... and not more crash. One would think that if the GPIO_IPConnected parameter was incorrect, it would simply cause the UART to not work. Thanks for your input.