Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 2:72f1cb514754, committed 2020-08-22
- Comitter:
- lorgei
- Date:
- Sat Aug 22 00:35:04 2020 +0000
- Parent:
- 1:28d4b59feaf3
- Commit message:
- Test Commit
Changed in this revision
--- a/main.cpp Tue May 22 14:38:05 2018 -0700
+++ b/main.cpp Sat Aug 22 00:35:04 2020 +0000
@@ -27,21 +27,21 @@
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);
}
if (chipType == CHIP_TYPE_SX1262)
- radio.set_tx_dbm(true, 20);
+ radio.set_tx_dbm(true, 22);
else
radio.set_tx_dbm(false, 14);
@@ -54,10 +54,10 @@
p.lora.HeaderType = HEADER_TYPE_VARIABLE_LENGTH;
/* constant payload length of one byte */
p.lora.PayloadLength = 1;
- 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);
}
@@ -65,8 +65,17 @@
radio.SetDIO2AsRfSwitchCtrl(1);
radio.txDone = txDone_callback;
-
- for (;;) {
+
+ for (;;) {
+
+ 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);
+ {
+
+ }
+
radio.tx_buf[0] = seq; /* set payload */
txDone = false;
radio.start_tx(1); /* begin transmission */
@@ -75,7 +84,7 @@
while (!txDone) {
radio.service();
}
-
+ printf("tx %x\r\n", seq);
printf("got-tx-done\r\n");
wait(0.5); /* throttle sending rate */
--- a/mbed-os.lib Tue May 22 14:38:05 2018 -0700 +++ b/mbed-os.lib Sat Aug 22 00:35:04 2020 +0000 @@ -1,1 +1,1 @@ -https://github.com/ARMmbed/mbed-os/#79640c6a885d2006d3cedff3f666f8c253818c27 +https://github.com/ARMmbed/mbed-os/#3ab72c71b75cb9cb91160a54fba22ec43b036ed2
--- a/sx126x.lib Tue May 22 14:38:05 2018 -0700 +++ b/sx126x.lib Sat Aug 22 00:35:04 2020 +0000 @@ -1,1 +1,1 @@ -https://os.mbed.com/users/dudmuck/code/sx126x/#497af0bd9e53 +https://os.mbed.com/users/dudmuck/code/sx126x/#5703598a88fb