UART2 problem in STM32F407ZG

General discussion on mikroC PRO for ARM.
Post Reply
Author
Message
pensees
Posts: 15
Joined: 29 Sep 2020 05:45

UART2 problem in STM32F407ZG

#1 Post by pensees » 25 Mar 2021 05:56

I'm using mikromedia+ for STM32 ARM board with STM32F407ZG MCU.

In case of UART6 (Using pin &47 and &48), it works fine.
But, UART2 (Using pin &45 and &46 - PD5_PA3) doesn't work.

I checked things...

1) MCU clock (Device clock) : 168MHz ("General project settings" and "VTFT settings" in "Edit project" window)

2) Connection : Rx - Tx, Tx - Rx (Do not connect Rx - Rx, Tx - Tx)

3) Seperate check : Both (Rx, Tx) not working

4) Using Software UART : Impossible. Because Rx, Tx ports are different each other.


<Code>

unsigned char cmd[16] = {'\x00', };

UART2_Init_Advanced(9600, _UART_8_BIT_DATA, _UART_NOPARITY, _UART_ONE_STOPBITS, &_GPIO_MODULE_USART2_PD5_PA3);

// cmd processing...
...

for (index = 0 ; index < length ; index++) {
UART2_Write(cmd[index]);
}


Please advice for me.
Thanks.

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: UART2 problem in STM32F407ZG

#2 Post by filip » 25 Mar 2021 15:13

Hi,

Can you please attach your project for inspection ?

Regards,
Filip.

pensees
Posts: 15
Joined: 29 Sep 2020 05:45

Re: UART2 problem in STM32F407ZG

#3 Post by pensees » 26 Mar 2021 02:22

Attach my project.

Setting file also included. (for "Device clock")


Thanks.
Attachments
MyExample.zip
(537.77 KiB) Downloaded 46 times

Post Reply

Return to “mikroC PRO for ARM General”