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.
I am using Nuvoton MS51FB9AE MCU,while testing UART looping program I am getting Dummy character in the middle the Actual data,need help in fixing this
#include "MS51_16K.H"
unsigned char uart_receive_data;bit receiveFlag,bufOverFlag;
/************************************************************************************************************//* Main function *//************************************************************************************************************/ void main(void){ P17_PUSHPULL_MODE;/* Modify HIRC to 24MHz for UART printf function only */ MODIFY_HIRC(HIRC_24); P06_QUASI_MODE; UART_Open(24000000,UART0_Timer3,9600); ENABLE_UART0_INTERRUPT; /* Enable UART0 interrupt */ ENABLE_GLOBAL_INTERRUPT; /* Global interrupt enable */ /* while receive data from RXD, send this data to TXD */ while(1) { if (uart0_receive_flag) { UART_Send_Data(UART0,uart0_receive_data); //P17 = ~P17; uart0_receive_flag = 0; bufOverFlag= 0; } }}
Actual data :arm community
OUTPUT :
arm commun⸮ty
arm community arm commu;<n⸮W⸮R⸮
arm commun⸮ty arm commun⸮ty arm⸮commun⸮ty arm commun⸮ty