BLG840F/X LTE Gateways and BN60E LTE Beacon
Draft Ver 0.51 July 2019
Firmware to Control Power Amplifier in BLG840X
The following codes are used to set up and control power amplifier SKY66112 in USB840X. Codes can be
downloaded from:
https://www.fanstel.com/download-document
Header files
#ifndef PA_LNA_H__
#define PA_LNA_H__
#include "ble.h"
#include "app_error.h"
#include "nrf_drv_gpiote.h"
#include "nrf_drv_ppi.h"
void pa_lna_init(uint32_t gpio_pa_pin, uint32_t gpio_lna_pin);
#endif
Main program.
#include "pa_lna.h"
#define APP_PA_LAN
#ifdef APP_PA_LAN
#define APP_PA_PIN 17
#define APP_LNA_PIN 19
#define APP_CHL_PIN
8
#define APP_CPS_PIN
6
int main(void)
{
....
#ifdef APP_PA_LAN
nrf_gpio_cfg_output(APP_CPS_PIN);
nrf_gpio_cfg_output(APP_CHL_PIN);
nrf_gpio_pin_set(APP_CHL_PIN);
nrf_gpio_pin_clear(APP_CPS_PIN); //enable
pa_lna_init(APP_PA_PIN,APP_LNA_PIN);
!
14