cancel
Showing results for 
Search instead for 
Did you mean: 

STMf030 USART

sanjib
Associate III
Posted on April 05, 2014 at 10:39

The original post was too long to process during our migration. Please click on the attachment to read the original post.
25 REPLIES 25
sanjib
Associate III
Posted on April 07, 2014 at 06:31

Any body please help

sanjib
Associate III
Posted on April 07, 2014 at 13:19

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.

Posted on April 07, 2014 at 13:54

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.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
sanjib
Associate III
Posted on April 07, 2014 at 14:23

The original post was too long to process during our migration. Please click on the provided URL to read the original post. https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I6oC&d=%2Fa%2F0X0000000bvu%2FRwJD8OMtuBp4LtKnpZy8yAkkBrjVpL1wSRGb5RIxuF8&asPdf=false
stm322399
Senior
Posted on April 07, 2014 at 14:42

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 ?

sanjib
Associate III
Posted on April 07, 2014 at 15:31

The original post was too long to process during our migration. Please click on the provided URL to read the original post. https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I6ls&d=%2Fa%2F0X0000000bv0%2F4M2slBk2K81twBwsI6.aquLXpLfJtWhklwx_l721bZM&asPdf=false
stm322399
Senior
Posted on April 07, 2014 at 15:48

Try GPIO_AF_0 for PB6/PB7

frankmeyer9
Associate II
Posted on April 07, 2014 at 15:51

You told us never reaching a given line of code. How do you know that ?

 

Are you using a debugger ?

 

I bet not.

Posted on April 07, 2014 at 16:02

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 the

http://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.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..