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.

CC2530 UART vs SPI problem

Other Parts Discussed in Thread: CC2530, Z-STACK

Hello:

I have a problem when using UART1 module in CC2530 with Zstack 2.5.0. My code is based on GenericApp. I have 1 end device sending a number of bytes to 1 router. My end device gets data from uart1 configured as an SPI interface. My router receives data (it does I see it on debugger) and is supposed to send it using uart1 configured as uart. The problem is that the end device works fine but router  isn’t sending data to Tx pins (I’m using an oscilloscope and Tx line is flat). My configuration code is this and is the same for both devices:

void HalSpiInit(void)

{

  PERCFG |= 0x00;

#if defined(ENDDEV)  

  U1CSR = 0x00;

  U1UCR = 0x00;

  P0SEL |= 0x38;  

#endif

#if defined(ROUTER)

  U1CSR = 0x80;

  U1UCR = 0x01;

  P0SEL |= 0x30;  

#endif 

/* Setup for 115200 baud. */

  U1GCR = 11;

  U1BAUD = 216;

    U1GCR |= BV(5);

    P2SEL &= ~0x20;  /* PRI2P1 */

    P2DIR |= 0x40;

    U1CSR |= 0x40;

#if defined(ENDDEV) 

    P0DIR |= 0x04;

  P0 |= 0x04;

#endif

 

}

This code runs on hal_drivers.c with HAL_SPI=TRUE and no HAL_DMA definition. When router is trying to tx data these configuration bits are set in accordance with this code (again seen on debugger).

I can’t figure out what I’m doing wrong. Any ideias?