Hi all, I have configured the McBSP #1 as GPIO (RRST_ = 0 RIOEN = 1). When I read the voltage on that pin (the pin is not connected, working with 5509 EVM from Spectrum Digital), I read 0 but the DSP read a logical 1 If I link the pin to the ground, the DSP sees a 0. Looks like I need a Pull down. Here is my problem : what is the recommended value for the resistor? Thanks in advance Laurent |
|
McBSP as GPIO
Started by ●September 30, 2002
Reply by ●March 31, 20042004-03-31
Hi..... Im using TMS320VC5416 DSP and i want to use the McBSP as general purpose IO. I want to use one of the pin to control a modem and I choose to use pin DX. I followed the instructions in the spru302.pdf document but the Output pin value is not correct. The PIN that I check my Output value is Pin 7 of connector P3. Here is my program, could you please advise on what i did wrong. Thank you volatile int *McBSP0_SPSA=(volatile int *)0x0038; volatile int *McBSP0_SPSD=(volatile int *)0x0039; #define SPCR1 0x0000 // address SPCR1 #define SPCR2 0x0001 // address SPCR2 #define PCR 0x000E // address PCR #define N 7 void main() { int value=0; *McBSP0_SPSA = SPCR1; value = *McBSP0_SPSD; value = value & 0xFFFE; // value & 1111 1111 1111 1110 *McBSP0_SPSD = value; printf("\n SPCR1 value %x\n",value); *McBSP0_SPSA = SPCR2; value = *McBSP0_SPSD; value = value & 0xFFFE; // value & 1111 1111 1111 1110 *McBSP0_SPSD = value; printf("\n SPCR2 value %x\n",value); *McBSP0_SPSA = PCR; value = *McBSP0_SPSD; value = value | 0x3020; // value | 0011 0000 0010 0000 //value = value | 0x3000; *McBSP0_SPSD = value; printf("\n PCR value %x\n",value); } Sazali Senawi, DSP Lab, UTM. ________________________________________________________________________ Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now http://uk.messenger.yahoo.com/download/index.html |