cancel
Showing results for 
Search instead for 
Did you mean: 

UART0 Tx on Port6.7 (Alt 3) Problem

dbarbarine
Associate II
Posted on February 27, 2009 at 03:23

UART0 Tx on Port6.7 (Alt 3) Problem

4 REPLIES 4
dbarbarine
Associate II
Posted on May 17, 2011 at 09:53

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!!!

doebber
Associate II
Posted on May 17, 2011 at 09:53

Hi dbarbarine !

I just have the same problem. Do you have a solution.

Please let me know.

regards

Marc

lillian_200601
Associate II
Posted on May 17, 2011 at 09:53

I wonder whether the setting below is correct?

GPIO_InitStructure.GPIO_IPConnected = GPIO_IPConnected_Enable;

dbarbarine
Associate II
Posted on May 17, 2011 at 09:53

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.