I will add onto my question above… I have a few SAMR34 Xplained pro codes and i want to migrate it to RAK4260. However, just changing pin declarations does not work. Just to mention, my RAK4260 breakout module works flawlessly with the provided RAK firmware/code.
To convert my SAMR34 codes into RAK4260, i have done the following changes.
In board_init.c, Added:
/* Configure RFSWITCH SKY13373 PWR as output */
pin_conf.direction = PORT_PIN_DIR_OUTPUT;
In samr34_xplained_pro.h, added and changed:
#define RF_SWITCH_PIN PIN_PA13
#define RF_SWITCH_ACTIVE true
#define RF_SWITCH_INACTIVE !RF_SWITCH_ACTIVE
#define RFSW_PWR_PIN PIN_PA28
#define RFSW_PWR_ACTIVE true
#define RFSW_PWR_INACTIVE !RFSW_PWR_ACTIVE
#define TCXO_PWR_PIN PIN_PB03
#define TCXO_PWR_ACTIVE true
#define TCXO_PWR_INACTIVE !TCXO_PWR_ACTIVE
To the radio_driver_hal.c, updated the TCXO function to include the RF switch power on, off, as given in http://www.marvellconsultants.co.uk/LoRaNode/index.html
port_pin_set_output_level(RFSW_PWR_PIN, RFSW_PWR_ACTIVE); // also enable RF switch
Do i need to do any other changes? This does NOT work for me, and my RAK4260 cannot do OTAA. I tried with ABP, and it works! So i presume it is the RF switch that is not able to give a downlink to the R34 module.
Cant understand why did RAK have to change the pin config of the 4260 module, when compared to the Xplained pro board! All the Microchip examples would have been a straight forward fit if the pins had been the same.
Someone, please help!