November 22, 2024, 07:30:01 PM

Initializing USART3, COM2

Started by BobOliver, April 12, 2016, 09:46:32 PM

Previous topic - Next topic

BobOliver

Hi,

I have an STM32-P407 and am having problems getting the second RS232 port to work, USART3.  I am using an IAR Electronic Workbench development system and use the same COM_Init for both COM1 and COM2, COM1 works, but COM2 doesn't.  The address being passed for COM2 is 0x40004800, which is the base address listed in the 407 data sheet for USART3.  When I step through the code USART6 (COM1) registers are all initialized but USART3 (COM2) registers are all still zero after initialization. 

Is there something special about USART3 that I am missing?
Does anyone know of example code to initialize and use USART3?

Thanks,
Bob

JohnS

#1
What do IAR say?  (Sounds like their bug.)

It may be that USART3 is an alternate function or the like and needs some config in case you didn't do it.

edit: looks like default would be FSMC so you need to change that

John