We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
hey,
I wrote below code but I never get 'A' in output!!!!
I use Arduino uno to read data!
void SysTick_Handler(void){ i++; if(i==1000) i=0; } int main(){ RCC->AHB1ENR|=RCC_AHB1ENR_GPIOAEN; RCC->APB1ENR |=RCC_APB1ENR_USART2EN; // enable usart2 //PA2,PA3 GPIOA->MODER |=0xA0; // enable PA2,PA3 GPIOA->OSPEEDR |=0xA0; // set speed GPIOA->AFR[0]=0x7700; // set AFR7 USART2->CR1=0x2008; USART2->BRR=0x1117; SysTick_Config(168000); while(1){ USART2->DR='A'; } }
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.