2014-04-05 01:39 AM
2014-04-06 09:31 PM
Any body please help
2014-04-07 04:19 AM
Please anybody can suggest me why my code is not working for stm21f030 , which is working fine for stm32f407 please have a look in the first post in this item.
2014-04-07 04:54 AM
Look, a description of ''not working'' and a wall-of-text source code is not going to get much support.
The fact it works on some other chip/board suggests you need to be looking at what the hardware HERE is doing. You need to do some debugging, and analysis with a scope or logic analyzer, and better describe what is and what isn't occurring. What board is this? One of your own design/construction? If so provide schematics. Clean the code up, or simplify it, so you can test what's happening with it. Learn to own your designs/problems.2014-04-07 05:23 AM
2014-04-07 05:42 AM
Conditional compilation make us (those wanting to help you) very difficult to diagnose your problem.
You told us never reaching a given line of code. How do you know that ? Are you using a debugger ? does some breakpoint never trigger ? When you program freezes, do you know where it is ? Please remove #ifdef from your example, run it and come back to tell us what's wrong. You have conditional compilation in RCC setup, are you sure that all USART are correctly clocked ?2014-04-07 06:31 AM
2014-04-07 06:48 AM
Try GPIO_AF_0 for PB6/PB7
2014-04-07 06:51 AM
You told us never reaching a given line of code. How do you know that ?
Are you using a debugger ?
I bet not.
2014-04-07 07:02 AM
The board is stm32f030R8t6 the code is sending data from USARt 1 to usart2 and usart2 to usart1 (half duplex) the same code is working for stm32f407. but this is not working . I have debugged it and it's not entering the while(NbrOfDataToRead1--). Please have a look .
You keep basically RESTATING the same fact set, this doesn't help your cause. It's irrelevant that the ''SAME'' code works on some other chip with some other peripheral/core implementation. The problem is it doesn't work HERE. You need to idenitfy what's happening because the gear is on your bench. You've specified a chip, is this thehttp://www.st.com/web/en/catalog/tools/PF259100
? Are you sure you have the pins wired correctly? Are there any solder bridges (SB) used/required? When the data is transmitted can you observe/verify this on an oscilloscope? If you wire that into a full duplex USART_RX, does that work, for example? DON'T assume that all problems are SOFTWARE, or can be fixed by staring at source code. Post source code using ''Format Code Block'' tool (Paintbrush [<>] icon), ideally identifying what's different between the last wall of code.