Other Parts Discussed in Thread: CONTROLSUITE
Hello all,
i am developing a gui application which interacts with my picollo.
i have a picollo controlStick which has F28027 on it.
i have configured it to send and receive data from the built-in usb on it. Currently i manage sending data out of it to my computer and seeing the results in the hyper-terminal and putty. my problem is i cannot send data to it, i can only receive. the putty does not even let me type anything.
how can i fix it so that i will also be able to send data to it from the hyper-terminal?
Of course i have configured the usb port b in my computer to load VCP that way i got a serial com port to connect to through the terminal.
some code :
here are the relevant configurations i have made:
EALLOW;
GpioCtrlRegs.GPAPUD.bit.GPIO28 = 0; // Enable pull-up for GPIO28 (SCIRXDA)
GpioCtrlRegs.GPAPUD.bit.GPIO29 = 1; // Disable pull-up for GPIO29 (SCITXDA)
GpioCtrlRegs.GPAQSEL2.bit.GPIO28 = 3; // Asynch input GPIO28 (SCIRXDA)
GpioCtrlRegs.GPAMUX2.bit.GPIO28 = 1; // Configure GPIO28 for SCIRXDA operation
GpioCtrlRegs.GPAMUX2.bit.GPIO29 = 1; // Configure GPIO29 for SCITXDA operation
EDIS;
SciaRegs.SCIFFCT.all=0x0000;
SciaRegs.SCIFFTX.all=0xE000; // Enable transmit FIFO
SciaRegs.SCIFFRX.all=0x2000; // Enable receive FIFO
SciaRegs.SCICTL2.all=0x0000;
SciaRegs.SCIHBAUD = 194 >> 8 ; // 9600 Baud ; LSPCLK = 15MHz
SciaRegs.SCILBAUD = 194 & 0x00FF;
SciaRegs.SCIPRI.all=0x0018;
SciaRegs.SCICCR.all=0x0007; // 8 bit character length, No parity, 1 stop bit
SciaRegs.SCICTL1.all=0x0023; // Enable the SCI
in order to send:
while ( SciaRegs.SCICTL2.bit.TXEMPTY == 0); //wait for TX -empty
SciaRegs.SCITXBUF=sendingString[index];
and receive:
while(SciaRegs.SCIFFRX.bit.RXFFST !=1) { } // wait for XRDY =1 for empty state
// Get character
ReceivedChar = SciaRegs.SCIRXBUF.all;
Can anyone see the problem?