Pumpkin, Inc.

Pumpkin User Forums

USART0 , SPI after I2C problem

If you have a general question or comment regarding the CubeSat kit, post it here.

USART0 , SPI after I2C problem

Postby barmagan » Thu Oct 30, 2008 4:31 am

Hi,
I can't switch to SPI after I2C communication. I can't change U0CTL (always i2c bit is set and reads 0x25)

switching code I use:
<code>
UCTL0 = CHAR + SYNC + MM + SWRST; // 8-bit SPI Master **SWRST**
UTCTL0 = CKPL + SSEL1 + SSEL0 + STC; // SMCLK, 3-pin mode
UBR00 = 0x02; // UCLK/2
UBR10 = 0x00; // 0
UMCTL0 = 0x00; // No modulation
ME1 |= USPIE0; // Enable USART0 SPI mode
UCTL0 &= ~SWRST; // Initialize USART state machine
CSK_IO_OUTPUT(P4,BIT5);
CSK_IO_LOW(P4,BIT5); //-ON_SD = 1 (powerUP SDCARD)
OS_Delay(1);
CSK_IO_OUTPUT(P3,BIT0);
CSK_IO_HIGH(P3,BIT0); //-CS_SD = 1 (deselect SDCARD)
</code>

barmagan
 
Posts: 7
Joined: Thu Oct 23, 2008 11:00 pm

Re: USART0 , SPI after I2C problem

Postby aek » Thu Oct 30, 2008 5:00 am

Review TI's SLAU049 carefully -- there are several references to the (only) correct way to switch between USART0's three modes (UART, SPI and I2C).

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: USART0 , SPI after I2C problem

Postby aek » Thu Oct 30, 2008 5:03 am

Please do not post the same question to multiple Pumpkin forums.

As this is really an MSP430 question (and not one specific to Salvo or the CubeSat Kit), I would suggest posting to something like the Yahoo MSP430 group.

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm


Return to CubeSat General

Who is online

Users browsing this forum: No registered users and 1 guest

cron