EmbeddedRelated.com
Forums

{MSP430} conflict between USART and SPI

Started by kalyani lagidi July 26, 2006
hi ,
i'm using msp430f149 with both the uart's connected to other outside interfaces. i want to interface a FRAM which works on spi to msp430f149.
My doubt is how will i manage my system when in spi mode if i get any command on uart line. In user manual, page 290 he mentions that
Data written to UxTXBUF when UTXIFGx = 0 and USPIEx = 1 may result in
erroneous data transmission.

Also the baud rate for msp430 in master mode is max of BRCLK/2 and my external crystal is of 7.3728MHz.

lots of thanks in advance.

---------------------------------
.
SMS memory full? Store all your important SMS in your Yahoo! Mail. Register for SMS BAK UP now!



Beginning Microcontrollers with the MSP430

I suggest that you manage the communications with restrictive states. And
you need to know which interface has more priority. As example, if UART has
more priority i would suggest yo have configured UART as default and when
you need SPI you change de configuration. OF course, this is in case of SPI
master.



_____

From: m... [mailto:m...] On Behalf Of
kalyani lagidi
Sent: Micoles, 26 de Julio de 2006 04:43 a.m.
To: m...
Subject: [msp430] {MSP430} conflict between USART and SPI

hi ,
i'm using msp430f149 with both the uart's connected to other outside
interfaces. i want to interface a FRAM which works on spi to msp430f149.
My doubt is how will i manage my system when in spi mode if i get any
command on uart line. In user manual, page 290 he mentions that
Data written to UxTXBUF when UTXIFGx = 0 and USPIEx = 1 may result in
erroneous data transmission.

Also the baud rate for msp430 in master mode is max of BRCLK/2 and my
external crystal is of 7.3728MHz.

lots of thanks in advance.

.
SMS memory full? Store all your important SMS in your Yahoo! Mail. Register
for SMS BAK UP now!




--


--






You can't run sync and async concurrently on MSP430.

Your options would be :
1. Make sure that you don't need to RX serial asynchronous data while you're using the
USART in
SPI mode.
2. Interrupt on the start bit of serial async data, use the /HOLD function on your FRAM,
and allow
in the async protocol that talks to your MSP430 to send a dummy character as a
"request" to talk
to the async part of USART.
You might need to tie the RXD pin to an interrupt pin on P1 or P2 to request the
switch from
async -> sync.

HTH
-- Kris

>-----Original Message-----
>From: m... [mailto:m...] On Behalf Of kalyani lagidi
>Sent: Wednesday, 26 July 2006 5:43 PM
>To: m...
>Subject: [msp430] {MSP430} conflict between USART and SPI
>
>hi ,
> i'm using msp430f149 with both the uart's connected to other outside interfaces.
i want to
>interface a FRAM which works on spi to msp430f149.
> My doubt is how will i manage my system when in spi mode if i get any command on uart
line. In
>user manual, page 290 he mentions that
> Data written to UxTXBUF when UTXIFGx = 0 and USPIEx = 1 may result in
> erroneous data transmission.
>
> Also the baud rate for msp430 in master mode is max of BRCLK/2 and my external
crystal is
>of 7.3728MHz.
>
> lots of thanks in advance.
>---------------------------------
> .
>SMS memory full? Store all your important SMS in your Yahoo! Mail. Register for SMS BAK
UP now!
>
>
On 2006-07-26, kalyani lagidi wrote:

> i'm using msp430f149 with both the uart's connected to other
> outside interfaces. i want to interface a FRAM which works
> on spi to msp430f149. My doubt is how will i manage my
> system when in spi mode if i get any command on uart line.
> In user manual, page 290 he mentions that Data written to
> UxTXBUF when UTXIFGx = 0 and USPIEx = 1 may result in
> erroneous data transmission.

I'm not sure what your question is, but data received on the
UART rx pin while in SPI mode will be ignored.

--
Grant Edwards grante Yow! I have many CHARTS
at and DIAGRAMS...
visi.com
Grant Edwards wrote: On 2006-07-26, kalyani lagidi wrote:

> i'm using msp430f149 with both the uart's connected to other
> outside interfaces. i want to interface a FRAM which works
> on spi to msp430f149. My doubt is how will i manage my
> system when in spi mode if i get any command on uart line.
> In user manual, page 290 he mentions that Data written to
> UxTXBUF when UTXIFGx = 0 and USPIEx = 1 may result in
> erroneous data transmission.

I'm not sure what your question is, but data received on the
UART rx pin while in SPI mode will be ignored.

--
Grant Edwards grante Yow! I have many CHARTS
at and DIAGRAMS...
visi.com

I agree that in spi mode any data on UART Rx pin is ignored which is not accepatable in my case, as i cannot miss any command on UART Rx pin. So now i'v decided to implement spi on GPIOs.



---------------------------------
Heres a new way to find what you're looking for - Yahoo! Answers





Edwards,
I agree that the data received on UART Rx pin is ignored in spi mode which my critical application cannot afford to lose any data on UART line. so i 'v decided on implementing spi on gpio.

thanks

Grant Edwards wrote:
On 2006-07-26, kalyani lagidi wrote:

> i'm using msp430f149 with both the uart's connected to other
> outside interfaces. i want to interface a FRAM which works
> on spi to msp430f149. My doubt is how will i manage my
> system when in spi mode if i get any command on uart line.
> In user manual, page 290 he mentions that Data written to
> UxTXBUF when UTXIFGx = 0 and USPIEx = 1 may result in
> erroneous data transmission.

I'm not sure what your question is, but data received on the
UART rx pin while in SPI mode will be ignored.

--
Grant Edwards grante Yow! I have many CHARTS
at and DIAGRAMS...
visi.com




---------------------------------
Heres a new way to find what you're looking for - Yahoo! Answers





Edwards,
I agree that the data received on UART Rx pin is ignored in spi mode which my critical application cannot afford to lose any data on UART line. so i 'v decided on implementing spi on gpio.

thanks

Grant Edwards wrote:
On 2006-07-26, kalyani lagidi wrote:

> i'm using msp430f149 with both the uart's connected to other
> outside interfaces. i want to interface a FRAM which works
> on spi to msp430f149. My doubt is how will i manage my
> system when in spi mode if i get any command on uart line.
> In user manual, page 290 he mentions that Data written to
> UxTXBUF when UTXIFGx = 0 and USPIEx = 1 may result in
> erroneous data transmission.

I'm not sure what your question is, but data received on the
UART rx pin while in SPI mode will be ignored.

--
Grant Edwards grante Yow! I have many CHARTS
at and DIAGRAMS...
visi.com




---------------------------------
Heres a new way to find what you're looking for - Yahoo! Answers