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.

changing UART port, P0.3

Other Parts Discussed in Thread: CC2430

Hello everyone, I'm currently working with the cc2430 chip and trying the SerialApp, right now I'm trying to chage the port ff the UART that comes by default in the test program for the CoordinatorDB but I 'm having some problems and maybe one of you can help me out a little.

I'm trying to enable the UART0 instead of UART1 and I did that (I suppose)  changing to TRUE the UART0 like this :

#if HAL_UART
  #define HAL_UART_0_ENABLE  TRUE
  #define HAL_UART_1_ENABLE  FALSE

By default the TX is in the P1.6 and I want to change it to the ping P0.3 and I thought that by enabling the UART0 will do it but I was mistaken because I'm not receiving anything. Can anyone tell me what else do I have to do? Maybe I'm have to change a register or parameter that I haven't figure it out yet.

I already check that if I enable the UART0 the Tx and Rx should be in the P0.3 and P0.2 because in the hal_uart.c is :

#define HAL_UART_0_P0_RX_TX       0x0c  // Peripheral I/O Select for Rx/Tx.

If anybody can help it will be great!

Thanks

Alejandro R.

 

 

  • Take a look at Table 40 page 80 in the CC2430 data sheet. Tx on P1.6 is USART1 Alt-2 and P0.3 for USART0 Alt-2.

    In addition to setting up the right USART make sure PERCFG bit 0 is 1 to select alt-2 as shown on page 83. If you are using IAR the Edit/find in files is very useful to follow a HAL command and see what it is really doing at the register level.