Loren Geilen
/
sx126x_simple_RX_shield_Aug_2020_Final
Test Commit
Revision 2:db4d49d5aa77, committed 2020-08-22
- Comitter:
- lorgei
- Date:
- Sat Aug 22 00:33:41 2020 +0000
- Parent:
- 1:ce312fc7dd18
- Commit message:
- Test Commit
Changed in this revision
diff -r ce312fc7dd18 -r db4d49d5aa77 main.cpp --- a/main.cpp Tue May 22 14:27:12 2018 -0700 +++ b/main.cpp Sat Aug 22 00:33:41 2020 +0000 @@ -36,17 +36,17 @@ radio.setStandby(STBY_XOSC); radio.setPacketType(PACKET_TYPE_LORA); - radio.setMHz(915.0); + radio.setMHz(915.5); { ModulationParams_t mp; - mp.lora.spreadingFactor = 7; - mp.lora.bandwidth = LORA_BW_125; + mp.lora.spreadingFactor = 11; + mp.lora.bandwidth = LORA_BW_500; mp.lora.codingRate = LORA_CR_4_5; mp.lora.LowDatarateOptimize = 0; - radio.xfer(OPCODE_SET_MODULATION_PARAMS, 4, mp.buf); + radio.xfer(OPCODE_SET_MODULATION_PARAMS, 4,0, mp.buf); } { @@ -56,10 +56,10 @@ p.lora.PreambleLengthLo = 8; p.lora.HeaderType = HEADER_TYPE_VARIABLE_LENGTH; p.lora.PayloadLength = 0x40; // max limit in rx - p.lora.CRCType = CRC_ON; + p.lora.CRCType = LORA_CRC_ON; p.lora.InvertIQ = STANDARD_IQ; - radio.xfer(OPCODE_SET_PACKET_PARAMS, 6, p.buf); + radio.xfer(OPCODE_SET_PACKET_PARAMS, 6,0, p.buf); } antswPower = 1; @@ -69,7 +69,13 @@ radio.start_rx(RX_TIMEOUT_CONTINUOUS); - for (;;) { + for (;;) { + + radio.service(); + uint8_t buf[2]; + buf[0] = 0; // TX base address + buf[1] = 0; // RX base address + radio.xfer(OPCODE_SET_BUFFER_BASE_ADDR, 2,0, buf); } }
diff -r ce312fc7dd18 -r db4d49d5aa77 mbed-os.lib --- a/mbed-os.lib Tue May 22 14:27:12 2018 -0700 +++ b/mbed-os.lib Sat Aug 22 00:33:41 2020 +0000 @@ -1,1 +1,1 @@ -https://github.com/ARMmbed/mbed-os/#79640c6a885d2006d3cedff3f666f8c253818c27 +https://github.com/ARMmbed/mbed-os/#3ab72c71b75cb9cb91160a54fba22ec43b036ed2
diff -r ce312fc7dd18 -r db4d49d5aa77 sx126x.lib --- a/sx126x.lib Tue May 22 14:27:12 2018 -0700 +++ b/sx126x.lib Sat Aug 22 00:33:41 2020 +0000 @@ -1,1 +1,1 @@ -https://os.mbed.com/users/dudmuck/code/sx126x/#497af0bd9e53 +https://os.mbed.com/users/dudmuck/code/sx126x/#5703598a88fb