DSPRelated.com
Forums

Configuring McBSP for RS-232

Started by H July 4, 2008
Hi,
I've e-mailed the group about this before (see "RS-232 on DM642
EVM"). I really have trouble configuring McBSP registers. I'm using
a 720 MHz DM642 EVM.
1. (SRGR) Is baud=CLKG frequency? Given that CLKG freq=(CPU freq/4)/
(CLKGDV+1), the slowest baud is 703.125 khz? So fast? I need to
interface to a hardware with a more modest speed of 19200 or 38400
bit/s.
2. (SRGR) What is the function of FPER and FWID? Can I just put them
to 0?
3. (RCR & XCR) Since I'm connecting to a "simple RS-232 device" &
only be sending small data each time, I assume I don't need phase 2,
i.e. RPHASE is single.
4. (RCR & XCR) Does the value of RWDLEN & XWDLEN affect the other
device?
A couple more questions:
5. The voltage level used by the EVM is -5V. Can it interact with
another device at -8V or -12V?
6. There are two RS-232 conectors on the EVM, J11 and J12. How do I
set which one to use?
I've been doing this for some time now. Please help if you can.
Thanks.
Hanief
Hanief

Refer Application Report SPRA633B . That gives details on using McBSP as
UART Interface . Its not the straight forward calculataion as you mentioned
.

rgds
Jai

On 7/4/08, H wrote:
>
> Hi,
> I've e-mailed the group about this before (see "RS-232 on DM642
> EVM"). I really have trouble configuring McBSP registers. I'm using
> a 720 MHz DM642 EVM.
> 1. (SRGR) Is baud=CLKG frequency? Given that CLKG freq=(CPU freq/4)/
> (CLKGDV+1), the slowest baud is 703.125 khz? So fast? I need to
> interface to a hardware with a more modest speed of 19200 or 38400
> bit/s.
>

2. (SRGR) What is the function of FPER and FWID? Can I just put them
> to 0?
> 3. (RCR & XCR) Since I'm connecting to a "simple RS-232 device" &
> only be sending small data each time, I assume I don't need phase 2,
> i.e. RPHASE is single.
> 4. (RCR & XCR) Does the value of RWDLEN & XWDLEN affect the other
> device?
> A couple more questions:
> 5. The voltage level used by the EVM is -5V. Can it interact with
> another device at -8V or -12V?
> 6. There are two RS-232 conectors on the EVM, J11 and J12. How do I
> set which one to use?
> I've been doing this for some time now. Please help if you can.
> Thanks.
> Hanief
>
hanief,

the DM642 is setup to handle video signals, not RS-232 baud rate signals.
You might look at spruen2b.pdf for the details of the fields in the SRGR register.

I think that the communication on the DM642 is set toward video and audio signals and therefore will
not properly interface with slow signals with RS-232 baud rates.

R. Williams

---------- Original Message -----------
From: "H"
To: c...
Sent: Fri, 04 Jul 2008 02:55:18 -0000
Subject: [c6x] Configuring McBSP for RS-232

> Hi,
> I've e-mailed the group about this before (see "RS-232 on DM642
> EVM"). I really have trouble configuring McBSP registers. I'm using
> a 720 MHz DM642 EVM.
> 1. (SRGR) Is baud=CLKG frequency? Given that CLKG freq=(CPU freq/4)/
> (CLKGDV+1), the slowest baud is 703.125 khz? So fast? I need to
> interface to a hardware with a more modest speed of 19200 or 38400
> bit/s.
> 2. (SRGR) What is the function of FPER and FWID? Can I just put them
> to 0?
> 3. (RCR & XCR) Since I'm connecting to a "simple RS-232 device" &
> only be sending small data each time, I assume I don't need phase 2,
> i.e. RPHASE is single.
> 4. (RCR & XCR) Does the value of RWDLEN & XWDLEN affect the other
> device?
> A couple more questions:
> 5. The voltage level used by the EVM is -5V. Can it interact with
> another device at -8V or -12V?
> 6. There are two RS-232 conectors on the EVM, J11 and J12. How do I
> set which one to use?
> I've been doing this for some time now. Please help if you can.
> Thanks.
> Hanief
------- End of Original Message -------
Hanief,

On Fri, Jul 4, 2008 at 11:24 AM, Richard Williams
wrote:
> hanief,
>
> the DM642 is setup to handle video signals, not RS-232 baud rate signals.
> You might look at spruen2b.pdf for the details of the fields in the SRGR
> register.
>
> I think that the communication on the DM642 is set toward video and audio
> signals and therefore will
> not properly interface with slow signals with RS-232 baud rates.
>
> R. Williams
>
> ---------- Original Message -----------
> From: "H"
> To: c...
> Sent: Fri, 04 Jul 2008 02:55:18 -0000
> Subject: [c6x] Configuring McBSP for RS-232
>
>> Hi,
>> I've e-mailed the group about this before (see "RS-232 on DM642
>> EVM"). I really have trouble configuring McBSP registers. I'm using
>> a 720 MHz DM642 EVM.

see #6.

>> 1. (SRGR) Is baud=CLKG frequency? Given that CLKG freq=(CPU freq/4)/
>> (CLKGDV+1), the slowest baud is 703.125 khz? So fast? I need to
>> interface to a hardware with a more modest speed of 19200 or 38400
>> bit/s.
>> 2. (SRGR) What is the function of FPER and FWID? Can I just put them
>> to 0?
>> 3. (RCR & XCR) Since I'm connecting to a "simple RS-232 device" &
>> only be sending small data each time, I assume I don't need phase 2,
>> i.e. RPHASE is single.
>> 4. (RCR & XCR) Does the value of RWDLEN & XWDLEN affect the other
>> device?
>> A couple more questions:
>> 5. The voltage level used by the EVM is -5V. Can it interact with
>> another device at -8V or -12V?

This *should* not be a problem.
True RS232 devices should be able to decode -3 to -15v as a 1, +3 to
+15v as a zero, and be able to handle +/- 25v.

>> 6. There are two RS-232 conectors on the EVM, J11 and J12. How do I
>> set which one to use?
>> I've been doing this for some time now. Please help if you can.


Read the manual!!!
The DM642 EVM tech ref manual indicates that the RS232 connectors are
*NOT* connected to a McBSP but a dual UART (TLC16C752) device. Refer
also to the DM642 EVM schematics.

mikedunn

>> Thanks.
>> Hanief
> ------- End of Original Message -------

--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
Jai, I've read SPRA633B, thanks anyway.
R. Williams, surely SD wouldn't include RS-232 ports on the DM642
EVM if it is not usable. Anyway, I didn't know of spruen2b before,
thanks for that.
Mikedunn, all the examples on RS-232 I've seen before talks of
McBSP, hence my confusion. Furthermore, I've never programmed an RS-
232 port before. So what you're saying is I need not to bother with
McBSP at all, is that right? I'm checking out TLC16C752's datasheet
now.
Thanks,
Hanief

--- In c..., "H" wrote:
>
> Hi,
> I've e-mailed the group about this before (see "RS-232 on DM642
> EVM"). I really have trouble configuring McBSP registers. I'm
> using a 720 MHz DM642 EVM.
> 1. (SRGR) Is baud=CLKG frequency? Given that CLKG freq=(CPU
> freq/4)/(CLKGDV+1), the slowest baud is 703.125 khz? So fast? I
> need to interface to a hardware with a more modest speed of 19200
> or 38400 bit/s.
> 2. (SRGR) What is the function of FPER and FWID? Can I just put
> them to 0?
> 3. (RCR & XCR) Since I'm connecting to a "simple RS-232 device" &
> only be sending small data each time, I assume I don't need phase
> 2, i.e. RPHASE is single.
> 4. (RCR & XCR) Does the value of RWDLEN & XWDLEN affect the other
> device?
> A couple more questions:
> 5. The voltage level used by the EVM is -5V. Can it interact with
> another device at -8V or -12V?
> 6. There are two RS-232 conectors on the EVM, J11 and J12. How do
> I set which one to use?
> I've been doing this for some time now. Please help if you can.
> Thanks.
> Hanief
Hanief,

On Mon, Jul 7, 2008 at 2:56 AM, H wrote:
> Jai, I've read SPRA633B, thanks anyway.
> R. Williams, surely SD wouldn't include RS-232 ports on the DM642
> EVM if it is not usable. Anyway, I didn't know of spruen2b before,
> thanks for that.
> Mikedunn, all the examples on RS-232 I've seen before talks of
> McBSP, hence my confusion. Furthermore, I've never programmed an RS-
> 232 port before. So what you're saying is I need not to bother with
> McBSP at all, is that right? I'm checking out TLC16C752's datasheet
> now.


Forget the McBSP!!!

Until recently, the McBSP was the only serial port on c6x DSPs. The
McBSP can be configured a few hundred different ways for synchronous
operation, but it has no async support. The external UART was added
to solve this problem - I suspect to provide console support for
Linux.

Check out the registers - the control/status bits are pretty straight
forward. Getting a polled I/O routine up and running is pretty
straight forward.

mikedunn
> Thanks,
> Hanief
>
> --- In c..., "H" wrote:
>>
>> Hi,
>> I've e-mailed the group about this before (see "RS-232 on DM642
>> EVM"). I really have trouble configuring McBSP registers. I'm
>> using a 720 MHz DM642 EVM.
>> 1. (SRGR) Is baud=CLKG frequency? Given that CLKG freq=(CPU
>> freq/4)/(CLKGDV+1), the slowest baud is 703.125 khz? So fast? I
>> need to interface to a hardware with a more modest speed of 19200
>> or 38400 bit/s.
>> 2. (SRGR) What is the function of FPER and FWID? Can I just put
>> them to 0?
>> 3. (RCR & XCR) Since I'm connecting to a "simple RS-232 device" &
>> only be sending small data each time, I assume I don't need phase
>> 2, i.e. RPHASE is single.
>> 4. (RCR & XCR) Does the value of RWDLEN & XWDLEN affect the other
>> device?
>> A couple more questions:
>> 5. The voltage level used by the EVM is -5V. Can it interact with
>> another device at -8V or -12V?
>> 6. There are two RS-232 conectors on the EVM, J11 and J12. How do
>> I set which one to use?
>> I've been doing this for some time now. Please help if you can.
>> Thanks.
>> Hanief

--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php