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.

RTOS/LAUNCHXL-CC13-90: How to change the mode of CC1190 on CC13-90 launchpad.

Part Number: LAUNCHXL-CC13-90
Other Parts Discussed in Thread: CC1310, CC1190,

Tool/software: TI-RTOS

Hi,

I have 2 Launchpad of cc13-90 which i am using one as SERVER and other as CLIENT both are running on contiki OS.

I am facing the issue with enabling and disabling the power amplifier (CC1190). When i dig cc1190 doc i came to across that cc1190 is connected with CC1310 using GPIO 28,29,30 and  can operate in 5 different mode.

LGM_RX, LGM_TX,HGM_RX,HGM_TX,Power_down,

I my project i want to use TX_HGM and RX_HGM.

Producer of Project;

On SERVER SIDE:

1: SERVER will register with ADDR and SERVICE ID.

2: ENABLE HGM_TX

3: Send broadcast packet

4: Go to POWER_DOWN STATE

5: ENABLE HGM _RX

6: wait for packet from Client.

7: once packet received go to power down

8: Enable HGM_TX

9: Send ACK to Client

10: Go to POWER_DOWN

11: Repeat the step 5 ---> 10

STEPS on CLIENT SIDE

1: Register the Client with IPV6 address.

2: ENABLE RX_HGM

3; WAIT for packet from SERVER

4: Once packet received POWER_DOWN

5; set the time for X sec.

6: if X sec timer expire.

7:Enable HGM_TX and send packet to SERVER

8; Go to POWER_DOWN and set timer for Y sec

9; Enable HGM_RX and wait for ACK for Y sec

10: Once packet received or timeout POWER_DOWN the Client

8:Repeat step 5 ---> 10

on looking into code of contiki i came across given below API which can be used for enavle and disabling the GPIO pins.

------> ti_lib_rom_ioc_pin_type_gpio_output()  ----> to set the GPIO pins for output mode

------> ti_lib_gpio_clear_dio() ---> Clear the GPIO pins to 0

------> ti_lib_gpio_set_dio() ----> Enable the GPIO pins to 1

Question I have:

Q1: Given below is the Piece of code which i am using in my code for enabling and disabling the GPIO pins. Please have a look and let me know if it is the correct way to do so;

#ifndef POWER_CONTROL
#define POWER_CONTROL 1

static void init_pin(void){
  ti_lib_rom_ioc_pin_type_gpio_output(BOARD_IOID_DIO29);
  ti_lib_rom_ioc_pin_type_gpio_output(BOARD_IOID_DIO30);
  ti_lib_rom_ioc_pin_type_gpio_output(BOARD_IOID_DIO28);
}

static void RX_HGM(void) {

    ti_lib_gpio_clear_dio(BOARD_IOID_DIO30);
    ti_lib_gpio_set_dio(BOARD_IOID_DIO29);
    ti_lib_gpio_set_dio(BOARD_IOID_DIO28);

}

static void TX_HGM(void) {
    ti_lib_gpio_set_dio(BOARD_IOID_DIO30);
    ti_lib_gpio_clear_dio(BOARD_IOID_DIO29);
    ti_lib_gpio_set_dio(BOARD_IOID_DIO28);
}

static void POWER_DOWN(void) {
 
    ti_lib_gpio_clear_dio(BOARD_IOID_DIO30);
    ti_lib_gpio_clear_dio(BOARD_IOID_DIO28);
    ti_lib_gpio_clear_dio(BOARD_IOID_DIO29);
}

#endif

Q 2: Is it possible to enable TX_HGM and RX_HGM at same time.

Q 3: om which layer of contik netstack should i implement this functionality.

if you need any more info please let me know

Thanks in Advance.

  • Hi Himanshu,

    1.) You code looks correct. 

    2.) No it is not possible to have both TX HGM and RX HGM modes at the same time. Only one mode at a time.

    3.) You need to modify a couple of things:

    • Your CC1190 change-mode functions has to be called from the radio driver:
      • Modify prop-mode.c, found under cpu/cc26xx-cc13xx/rf-core
      • At least take a look at the functions rx_on_prop(), rx_off_prop(), transmit()
      • There may be more modifications needed

    • RF settings also needs to be modified:
      • Modify smartrf-settings.c, found under cpu/cc26xx-cc13xx/rf-core
      • the .txPower field for smartrf_settings_cmd_prop_radio_div_setup must be changed
      • the overrides list pOverrides must also be changed
      • You can retrieve settings from SmartRF Studio

    Just a quick disclaimer: the radio driver for the srf06-cc26xx platform on Contiki was never created with the LAUNCHXL-CC13-90 in mind, however, it is very doable to implement. But, you are on your own to implement and test the LAUNCHXL-CC13-90 support.

  • Thanks for input issue is resolved.