Sign in

username:

password:



Not a member?

Search c54x



Search tips

Subscribe to c54x



c54x by Keywords

5409 | 5416 | AD5 | ADC | BIOS | Boot | Booting | Bootloader | C540 | C5402 | C5409 | C5416 | CCS | Codec | DMA | Dmad | DSK | DSKPlus | Dsplib | EVM | FFT | FIR | Flash | GPIO | HPI | Initialization | Interrupt | JTAG | LOG_printf | MCBSP | RFFT | RTDX | Sampling | STLM | UART | VC540

Ads

Discussion Groups

Discussion Groups | TMS320C54x | McBSP as GPIO.

Technical discussions about the TI C54x DSPs (including the c5401, c5402, c5402a, c5404, c5407, c5409, c5409a, c5410, c5410a, c5416, c5420, c5421, c5441, c549, c5470 and c5471).

  

Post a new Thread

McBSP as GPIO. - fraizzer - Nov 22 9:44:00 2002



Hello

I have a 5402 DSK, and want to use the McBSP1 as a small GPIO port.
Could anyone help me with a short C example on how to setup the
McBSP1 as GPIO and how to control some of the pins as Output's.

Best Regards Jacob





(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )

Re: McBSP as GPIO. - Lucy Jordan - Nov 22 17:38:00 2002

look in the c54x reference set vol 5 (enhanced peripherals), i
believe, and you'll find all the mcbsp registers. there'll be a few
bits to set the mcbsp for gpio and another few bits to read/write to
the pins.
specifically look at page 2-96 (p121).

you may also want to read the chip support library api reference
guide. both of these documents should show up if you search for them
at www.ti.com

--- In c54x@y..., "fraizzer" <jacob@j...> wrote:
> Hello
>
> I have a 5402 DSK, and want to use the McBSP1 as a small GPIO port.
> Could anyone help me with a short C example on how to setup the
> McBSP1 as GPIO and how to control some of the pins as Output's.
>
> Best Regards Jacob





(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )

Re: Re: McBSP as GPIO. - Author Unknown - Nov 23 8:16:00 2002



Thank you. It lead me to this:

//Port nr. is CLKRP = 0, CLKXP = 1, FSRP = 2, FSXP = 3.
MCBSP_SUBREG_BITWRITE(1, PCR_SUBADDR, iPortNr, 1, 0);

MCBSP_SUBREG_BITWRITE(1, PCR_SUBADDR, iPortNr, 1, 1);

For setting and reseting the pins in GPIO mode. I chose to setup the
McBSP as GPIO from the DSP/BIOS configuration mannager.

/Jacob

>>>>> "Lucy" == Lucy Jordan <> writes:

Lucy> look in the c54x reference set vol 5 (enhanced peripherals), i
Lucy> believe, and you'll find all the mcbsp registers. there'll be a
Lucy> few bits to set the mcbsp for gpio and another few bits to
Lucy> read/write to the pins. specifically look at page 2-96 (p121).

Lucy> you may also want to read the chip support library api reference
Lucy> guide. both of these documents should show up if you search for
Lucy> them at www.ti.com

Lucy> --- In c54x@y..., "fraizzer" <jacob@j...> wrote:
>> Hello
>>
>> I have a 5402 DSK, and want to use the McBSP1 as a small GPIO port.
>> Could anyone help me with a short C example on how to setup the
>> McBSP1 as GPIO and how to control some of the pins as Output's.
>>
>> Best Regards Jacob




(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )