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
stm322399
Senior
Posted on April 08, 2014 at 10:34

OK, let's go back to the basics: throw away interrupt stuff, RX side, your data buffers etc ... Try to send in an endless loop a single char, just to make sure wires are correctly connected and baudrates synced with docklight.

Just another free guess: What can make your project working on F4 and not F0, might be the value of HSE_VALUE in your project. Make sure it matches your crystal (if you use HSE as clock).

frankmeyer9
Associate II
Posted on April 08, 2014 at 11:06

OK, let's go back to the basics:...

 

I honestly suggest to the OP to have a look at Arduino or similiar concepts/environments.

They present a much lower entry hurdle, compared to to the kind of bare-metal coding required here.

sanjib
Associate III
Posted on April 08, 2014 at 11:22

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=0680X000006I6oH&d=%2Fa%2F0X0000000bvx%2FcQPfG2UBgGva3P_4BIch.PXx2Ty8IN_d6kmBz.0il_k&asPdf=false
stm322399
Senior
Posted on April 08, 2014 at 11:42

I'am happy to see that the code is perfectly all right.

Before coming back to us in case something wrong happen, do not forget to change:

    GPIO_PinAFConfig(GPIOA, GPIO_PinSource9, GPIO_AF_0); //

    GPIO_PinAFConfig(GPIOA, GPIO_PinSource10, GPIO_AF_0);

into

    GPIO_PinAFConfig(GPIOA, GPIO_PinSource9, GPIO_AF_1); //

    GPIO_PinAFConfig(GPIOA, GPIO_PinSource10, GPIO_AF_1);

And tell us how you test and why you think something is working or not, plz help us to help you.

sanjib
Associate III
Posted on April 08, 2014 at 12:15

thanks a lot . I m learning a lot from you all and yes clive have always been a support for me

Once again thanks

But I wandered the code whics i have pasted above for stm32f407 and stm32f030 will be able to communicate with each othe . this is the right way or something else need to be done?

755087287
Associate
Posted on July 12, 2014 at 05:55

Oh,my god...

Thanks for remind me seriously take GPIO-AF as seriously.

I configure PA9 as USART1's TX!!

(I was just begin with stm32,although previously I was done these things in stm8s,it's really difference!)