Code for transmitting through adf. Directly give it the physical layer data to be transmitted.a
Fork of ADF_test by
Revision 23:2f89d47b862c, committed 2017-01-02
- Comitter:
- ee12b079
- Date:
- Mon Jan 02 12:53:13 2017 +0000
- Parent:
- 21:bae83ef7ac5f
- Commit message:
- Code updated for power testing
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r bae83ef7ac5f -r 2f89d47b862c main.cpp --- a/main.cpp Tue Aug 02 16:23:19 2016 +0000 +++ b/main.cpp Mon Jan 02 12:53:13 2017 +0000 @@ -45,6 +45,8 @@ InterruptIn IRQ(ADF_IRQ); //Ticker ticker; SPI spi(PTE1, PTE3, PTE2); +DigitalOut RF_SW_CNTRL_BCN(PTB17); +DigitalOut RF_SW_CNTRL_TX(PTB7); DigitalOut sys_pwr_rst (PTA16,0);//For eps DigitalOut gCS_ADF(SPI_CS_ADF); DigitalOut led(LED_RED); @@ -892,6 +894,10 @@ } int main() { + RF_SW_CNTRL_TX = 1; + wait_ms(25); + RF_SW_CNTRL_TX = 0; + COM_OC_SW = 1; while(1) { reset_flags; @@ -905,11 +911,15 @@ gCS_ADF=0; spi.write(0x1B);//1B0735 spi.write(0x07); - spi.write(0x35); +//************setting for PA_power_output***************** + //Put values below anything from 0x03,0x04,0x05.... to 0x3F : 0x03 is lowest (-20 dBm) and 0x3F is maximum (13.5 dBm) + spi.write(0x3F); +//********************************* gCS_ADF=1; CMD(CMD_PHY_TX); wait_us(2000); while(loop_on){ + led = !led; // toggle led wait_us(20); check();