2013-06-02 04:34 AM
hello :)
i had a problem when i send a character or receive a character , i always get a wrong character like ''-'' or a heart ... ps: i'm using rs232 -> USB converter here is my code: &sharpinclude ''stm32f4xx.h'' void main() { //UART4 initialization RCC->APB1ENR |= 0x00080000; // Enable clock for UART4 RCC->AHB1ENR |= 0x00000004; // Enable clock for GPIOC GPIOC->MODER |= 0x00a00000; // PC10, PC11 => AF mode GPIOC->AFR[1] |= 0x00008800; // select AF8 (UART4,5,6) for PA10, PA11 UART4->BRR = 0x1120; // 9600 baud UART4->CR1 |= 0x200c; // Enable UART for TX, RX UART4->CR1 |= 0x0020; // Enable RX interrupt while(1){ if (UART4->SR & 0x0080) { UART4->DR='a'; for (int i=0; i<10000000; i++) {}; } } } please any help! :( #too-vague2013-06-11 09:26 AM
ah sorry i dont know the reference exatly , it's not mentionned but it's normal one