I'm working on a project which contain a part in which I need to get a string that contains command (or just text) from the PC (working on visual studio environment).
The problem is that once I send a string from the computer such as "turnOnRed", the KL25z is not receiving all the string (I trying to keep it in char array)- sometimes it receiving one letter and sometimes it even get all string such as "delay
I using codewarrior, and in order to get the string i'm using the following command
char temp=uart_getchar (UART0_BASE_PTR); //it's waiting until data is at UART0_data register
temp is going to char array in case it's suitable (very short code).
the command is in a while function for multi reading.
note that if i send characters one by one it's working fine.
the problem (as I see it) is that the computer sends the string at once, and it the uart is not suitable for this kind of work, it doesn't have large FIFO buffer or something like that .
what solution can be to such thing?
Moreover, I need to send large text files and DMA should be suitable for it (I think), what configurations are needed for that? and will I face the same problem which I had in the normal use of UART.