DSPRelated.com
Forums

UART Blackfin

Started by sriram September 26, 2003
Hi all
Does any one has a sample code of a file transfer from the EZKIT board to a PC
through RS232 via UART.
Thanks
Regards
Sriram
sriram wrote:
> Hi all > Does any one has a sample code of a file transfer from the EZKIT board to > a PC through RS232 via UART.
What was wrong with the replies you had to the other thread(s)? It was suggested that you may find more luck in another group, have you tried posting there? Have you even attempted this task yet? What code have you written for the BF533? I suspect that you haven't set up the correct registers... you may need to set up specific ones for the timers as well as the uart. Nobody here is going to do this for you, but we might be able to help. If we are to help, you really need to tell us what you have tried and EXACTLY what you want to achieve and where it's going wrong. So far you have not demonstrated the slightest understanding of the problem in hand. Ben -- I'm not just a number. To many, I'm known as a String...
Hi 
Sorry about that..actually i wrote a code but i m not sure about
this...i m not sure whether i have set all the registers that  are
required...

#include<stdio.h>
#include <cdefbf533.h>

void main(void)
{
	
	FILE *fptr;
	fptr=fopen("test.txt","wr");
	
	

      	*pDMA7_PERIPHERAL_MAP=0x7000;
       	*pUART_GCTL=0x1;
        *pUART_LCR=0x0000;
        *pUART_IER=0x0003;
        *pDMA7_CONFIG=0x1000;
        *pDMA7_START_ADDR=fptr;
        *pDMA7_X_COUNT=10;
        *pDMA7_X_MODIFY=0x1;
        *pUART_LCR=0x0080;
        *pUART_DLL=0x001D;
        *pUART_DLH=0x0000;
        *pUART_LCR=0x0003;
        *pDMA7_CONFIG=0x1001;
              	   	       	   	

	}
My task is that i have DMA a file(having some data)to an another PC
through RS232 via UART through EZboard....i m not sure abou the serial
programming....
Thanks
Sriram

"Ben Pope" <ben@benpope.fsnet.co.uk> wrote in message news:<bl1qmt$u2e$1@newsg2.svr.pol.co.uk>...
> sriram wrote: > > Hi all > > Does any one has a sample code of a file transfer from the EZKIT board to > > a PC through RS232 via UART. > > What was wrong with the replies you had to the other thread(s)? > > It was suggested that you may find more luck in another group, have you > tried posting there? > > Have you even attempted this task yet? What code have you written for the > BF533? I suspect that you haven't set up the correct registers... you may > need to set up specific ones for the timers as well as the uart. > > Nobody here is going to do this for you, but we might be able to help. If > we are to help, you really need to tell us what you have tried and EXACTLY > what you want to achieve and where it's going wrong. So far you have not > demonstrated the slightest understanding of the problem in hand. > > Ben
sriram wrote:
> Hi > Sorry about that..actually i wrote a code but i m not sure about > this...i m not sure whether i have set all the registers that are > required... > > #include<stdio.h> > #include <cdefbf533.h> > > void main(void) > { > > FILE *fptr; > fptr=fopen("test.txt","wr"); > > > > *pDMA7_PERIPHERAL_MAP=0x7000; > *pUART_GCTL=0x1; > *pUART_LCR=0x0000; > *pUART_IER=0x0003; > *pDMA7_CONFIG=0x1000; > *pDMA7_START_ADDR=fptr; > *pDMA7_X_COUNT=10; > *pDMA7_X_MODIFY=0x1; > *pUART_LCR=0x0080; > *pUART_DLL=0x001D; > *pUART_DLH=0x0000; > *pUART_LCR=0x0003; > *pDMA7_CONFIG=0x1001; > > > } > My task is that i have DMA a file(having some data)to an another PC > through RS232 via UART through EZboard....i m not sure abou the serial > programming.... > Thanks > Sriram
Does your implementation allow "wr" as an argument? It's usually 'r' for read, 'w' for write. As to the specific registers... I wouldn't know. Do you need a link a timer in there and configure that or does the UART have it's own timer? Have you configured that for the correct baud rate? I would start off simple too... try dumping a single byte at the UART and seeing if hyperterminal displays it. All this DMA business to start with is going to make it tricky... strip it down to the bare essentials and get the basics working. Ben -- I'm not just a number. To many, I'm known as a String...
sriram2480@yahoo.com (sriram) wrote in 
news:d7967dc1.0309261349.49bf9d1c@posting.google.com:

> Sorry about that..actually i wrote a code but i m not sure about > this...i m not sure whether i have set all the registers that are > required...
Also look at the chip anomaly list for the BF variant you're using. In particular, there's an issue with IMASK having the wrong polarity in early chip revisions. For lurkers, the BF UART's are supposed to be register-compatible with PC UART's. I'd also suggest looking at the recent uClinux port from Metrowerks. Read through the console driver for the "frio" chip (another name for the BF). -- Kenneth Porter http://www.sewingwitch.com/ken/