I wrote below code but I never get 'A' in output!!!!
I use Arduino uno to read data!
RCC->APB1ENR |=RCC_APB1ENR_USART2EN; // enable usart2
GPIOA->MODER |=0xA0; // enable PA2,PA3
GPIOA->OSPEEDR |=0xA0; // set speed
GPIOA->AFR=0x7700; // set AFR7
Is it a quiz? Do you want us to guess which controller you are using?
Anyway, you better ask this question in a forum related to Arduino or the controller you are using.
I just send "A" from stm32f407vg to Arduino uno! I cant go out for buy serial to usb converterand I use Arduino for read data!!!!
For the stm32 setup I recommend a stm32 forum.
Anyway, print the received byte in hex and also check errors on Arduino's serial port.
View all questions in Cortex-M / M-Profile forum