2014-03-05 02:37 PM
Hi all,
I'm hoping this is an easy one and just something I am missing. A google didn't return anything obviously relating to my problem. I have some messy code that sets up my USART peripheral correctly. I have used GPIO_InitTypeDef GPIO_InitStructure; USART_InitTypeDef USART_InitStructure; ...cast as global structures at the top of the script. Main then uses these to setup the usart and begin transmitting. This works correctly. However, as my code grows I now have the need to put GPIO init in to it's own function. I noticed when doing this that having the USART_InitTypeDef USART_InitStructure; structure declared locally to the function the usart output did 'funny' things (not expected output). GPIO Init structure location seems to have no affect. Please advise! Thanks as always guys, Ian2014-03-06 10:14 AM
Thanks guys, I think i fully understand now.
IS there a chance my startup script is incorrect (and not clearing the stack memory it intends to use?)2014-03-06 10:22 AM
IS there a chance my startup script is incorrect (and not clearing the stack memory it intends to use?)
The goat isn't sure, I will stare at it harder...