Topic : USART2 problems on STM32F100C8T6B

Forum : ARM

Original Post
Post Information Post
August 10, 2011 - 1:17pm
Guest

I'm developing a project in Ride7 using this part. Comms works fine on USART1 - but I try to open a second port on USART2 and it doesn't works. Looking at the registers they are all zeros - i.e. initialisation has not changed them!

I can step the initialisation code through and see that they should be changing but they don't change, it's as if the silicon isn't there - or Ride7 is telling me lies?

Any ideas would be welcome.

Replies
Post Information Post
+1
0
-1
August 10, 2011 - 2:14pm
Raisonance Support Team

Hi,

I suggest you make sure that you have activated the UART2 clock gating and released its reset.

On STM32 devices each peripheral has its own clock gating and reset signal. And you must configure these two things before you can access the peripheral's registers. Look in functions like RCC_Configure, System_Init and others that are called before the working UART1 init. You should find some code that activates these things for the UART1. You just need to do the same for UART2.

I hope it helps,

Vincent

+1
0
-1
August 10, 2011 - 3:08pm
Guest

That's the problem - many thanks.