deRFmega25623M12 antenna diversity set

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi guys,

 

I use WSN from BitCloud and try to manualy set one of 2 antennas from deRFmega25623M12 chip (with SE2431L-R amplifierand I have some problems.

First of all I have set the antenna diversity for endnode and works properly because I have RSSI -10 near to the coordinator. In this case, coordinator has no amplifier signal chip and no antenna diversity. The configuration used for endNode with SE2431L-R amplifier is the next one:

\Components\HAL\Configuration

HAL_RF_RX_TX_INDICATOR = TRUE

HAL_ANT_DIVERSITY = TRUE

 

EndDevice.c

#if defined(_SLEEP_WHEN_IDLE_)

ANT_DIV &=  ~((1<<ANT_DIV_EN) | (1<<ANT_EXT_SW_EN)); // disable antena diversity

TRX_CTRL_1 &=  ~(1<<PA_EXT_EN); // External PA support enable OFF

 

DDRD  |=  0x40; //enable DDRD6

PORTD &= ~   0x40; //disable PD6

 

 

SYS_EnableSleepWhenIdle(); 

 

//DDRD  |=  0x40; 

PORTD |=  0x40; //enable PD6

TRX_CTRL_1 |= (1<<PA_EXT_EN); // External PA support enable  ON

ANT_DIV |= (1<<ANT_DIV_EN) | (1<<ANT_EXT_SW_EN); // enable antena diversity and external switch

 

#endif

 

Trying to set only one antenna through SE2431L-R amplifier,  I followed theATMEL documentation and used next configuration in BaseMainApp.c

 

DDRD  |=  0x40; //for deRFmega CSD activation

PORTD |=  0x40; 

ANT_DIV |= (0<<ANT_DIV_EN) | (1<<ANT_EXT_SW_EN) | (3<<ANT_SEL) | (1<<ANT_CTRL0); //similar as ATMEL recommendation from pdf document

TRX_CTRL_1 |= (1<<PA_EXT_EN) ;

 

\Components\HAL\Configuration

HAL_RF_RX_TX_INDICATOR = FALSE

HAL_ANT_DIVERSITY = FALSE

 

Something doesn't work properly because I have RSSI at -70 at less that 10 cm distance between coordinator and endnode.

I want to set only 1 antenna and I hope someone of you that has used deRFmega can guide me.

 

Of course, I have tryied the alexru recomendation https://community.atmel.com/forum/how-manually-switch-between-atmega128rfa1-antennas?skey=ANT_CTRL with the same bad results.

crying

Any sugestion?

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 no one?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Solved some time ago. 

Solution: migrate to BitCloud 3.3 , set ANT_DIV and recompile the HAL.