This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2541 USART1(SPI) on Port 1 Issue

Hello,

I am trying to use SPI on port1 (USART1) as Alternative 2.

That is, P1_4 = SS, P1_5=C, P1_6=MO, P1_7=MI

I set up as follows.

CLKCONCMD = (CLKCONCMD & ~(CLKCON_OSC | CLKCON_CLKSPD)) | CLKCON_CLKSPD_32M;
while (CLKCONSTA & CLKCON_OSC); // Wait until clock source has changed
 

PERCFG = (PERCFG & ~PERCFG_U1CFG) | PERCFG_U1CFG_ALT2;  //0x02

P2SEL |= 64 ; // USART1 priority
P2SEL &= ~32 ; // USART1 priority

P1SEL = (P1SEL & ~BIT4) | BIT5 | BIT6 | BIT7;

P1DIR |= BIT4;

U1CSR &= ~(U0CSR_MODE | U0CSR_SLAVE); // Master & SPI

U1BAUD = SPI_BAUD_M; //=0
U1GCR = (U1GCR & ~(U0GCR_BAUD_E | U0GCR_CPOL | U0GCR_CPHA | U0GCR_ORDER))
| SPI_BAUD_E; // =16

After this setup, I tried to send signals as follows.

P1_4 = 0; //SSN = LOW

U1DBUF = 0x90;

while(!(U1CSR & U0CSR_TX_BYTE));
U1CSR &= ~U0CSR_TX_BYTE;

But, I see nothing on pins (with oscilloscope) except SSN=LOW.

Did I something wrong? Am I missing something?

Any advice will be appreciated.

Thanks.

Best regards,

Yeonsik