Quantcast
Channel:
Viewing all articles
Browse latest Browse all 59170

Forum Post: Ask UART G12 / R5F102A9

$
0
0
Dear, I write program to send uart, but only first & last caracter.  void sendc(uint8_t c){ TXD0 = c; } void sends(const char *s){ while(*s != 0){ sendc(*s++); } } in main program while(1U){ sends("ABCXYZ"); delay(500); } init uart SAU0EN = 1U; NOP(); NOP(); NOP(); NOP(); ST0 = 0x03U; SMR00 = 0x22U; SCR00 = 0x8097U; SDR00 = 0xCE00U; NFEN0 |= 0x01U; SIR01 = 0x07U; SMR01 = 0x122U; SCR01 = 0x4097U; SDR01 = 0xCE00U; SO0 |= 0x01U; SOL0 |= 0x00U; SOE0 |= 0x01U; /* enable UART0 output */ /* Set RxD0 pin */ PM1 |= 0x02U; /* Set TxD0 pin */ P1 |= 0x04U; PM1 &= 0xFBU; SS0 |= 0x03U; just only receive "AZ" in terminal, can help me for my problem? Thanks 

Viewing all articles
Browse latest Browse all 59170

Trending Articles