Commit Graph

42 Commits (fd6f9bf134d2282234101331e81e43c2832f44c5)

Author SHA1 Message Date
Travis Hendrickson fd6f9bf134 BUGFIX: MODEM_LORA rx continuous was timing out 2020-03-30 09:03:19 +03:00
Kimmo Vaisanen 444e72561f Astyle fixes 2020-03-25 15:27:18 +02:00
Kimmo Vaisanen 2867b1878a Lora: Replace deprecated methods with new ones in Semtech drivers 2020-03-25 15:27:18 +02:00
Kimmo Vaisanen 68beebfd11 Fix SPI flags for SX1272 and SX1276 2020-03-23 10:15:59 +02:00
Antti Kauppila aed22776ef Corrected copyright for sx126x_ds.h 2020-03-10 10:21:22 +02:00
Hasnain Virk 6012fa43cf Adding SX126X radio driver
Driver compatible with SX126X series. Operates by default with Cold
Start sleep mode, i.e., the lowest possible power state while sleeping.
RX boost mode supported and the driver can be configured to get RX gain
at the orice of power. Default mode is normal RX gain.
2019-03-27 10:48:23 +02:00
Hasnain Virk bd00868a82 Removing mbed.h inclusion
It's better to include what we need rather than whole mbed.h.
Small style knits.
2019-03-27 10:48:23 +02:00
Hasnain Virk 16958f814d Using new rtos::Thread APIs
Some of the rtos::Thread APIs like signal_set() and signal_wait() are
noe deprecated. Although they are still backward compatible, we switch
to the new APIs.
2018-11-28 11:41:52 +02:00
Hasnain Virk 0c7dce4ff9 Adding support for low power timeouts
We had been on a mission to get rid of all the Timeout instances from
the radio drivers. However, 'tx_timeout' is a necessary evil which runs
every time we transmit so that we can inform the stack about any fatal
errors. The side effect of this Timeout is that it was using high-res
timeout which would lock the deep sleep and hence prevent the MCU to go
to deep sleep.

We have now added support for low power timeout and we check compile
time if the platform supports low power timeout to use it in the driver.
This means that now the 'tx_timeout' will not lock the deep sleep.
2018-10-11 15:37:11 +03:00
mattbrown015 a0540930db Corrected 'help' in SX1272 config item 2018-08-14 12:43:44 +03:00
mattbrown015 f067004d79 Allow configuration of the radio variant 2018-08-14 12:43:44 +03:00
Hasnain Virk 1a18f0a174 Correcting buffer size and tx timer units
This commit fixes two issues reported in #24 and #25.
The default buffer size for the radio driver should have been 255 (0xFF) not 256.
In addition to that it was pointed out that the tx timer values were inconsistent
with the doc. All timer values are considered in ms except symbol timeout and the
time value for set_tx_continuous_wave() API.
2018-07-11 12:11:38 +03:00
Hasnain Virk 5532d9d1f4 TX timeout issue fix
In case of catastrophic bus failure at radio end, we shouldn't reset the chip
as it will cause the chip to hang and then burst out interrupts in a fury resulting
in an ISR queue overflow.
rather than that we gracefully accept the failure and set the radio to sleep and
set the state to idle. In addition to that we inform the upper layers about the
failure.

A little touch up to the FHSS case, was actually a leftover from the previous PR.
We don't use FHSS mode, that was why we didn't catch in the testing.
2018-06-28 10:39:45 +03:00
Hasnain Virk 1a5f2fc054 Adding assert if rx timeout is out of range
Rx timeout in symbols cannot become more than 255 as the preamble length
is fixed. For diagonostics purposes we add an MBED_ASSERT.
2018-06-26 16:23:55 +03:00
Hasnain Virk 914f037c56 Deprecating receive(uint32_t) API
We are deprecating receive(uint32_t) API in favour of receive(void)
API because we are ditching software timeout timers in the driver
for RX chain.
2018-06-26 16:23:55 +03:00
Hasnain Virk 1a452545bb Changing double precision to float
We shouldn't use double precision as most of te embedded processors may
not support it.
2018-06-26 16:23:55 +03:00
Hasnain Virk 70908415fc Removing software RX timeouts in RX chain
Both in FSK and LoRa mode, we do not rely on software timers anymore.
This makes our timing precise and enables us to consume less power.
It also gives us flexibility which we need for future deep sleep
venture as Mbed OS timeout class may lock the sleep manager if not using
low power timers.
2018-06-26 16:23:55 +03:00
Kimmo Vaisanen c4dd25eec9 Fix correct pin check for rxctl
Fixes issue #20
2018-05-18 12:09:55 +03:00
Kimmo Vaisanen 4982a156a4 Remove obsolete FEATURE_COMMON_PAL flag
mbed-trace no longer requires COMMON_PAL.
2018-05-15 15:52:54 +03:00
Kimmo Vaisanen ab8b6915de Remove usage of DEVICE_SPI flag
DEVICE_SPI flag is no longer needed as our CI only builds
mbed-os-example-lorawan to targets which really have lora hw.
2018-05-15 15:04:37 +03:00
Kimmo Vaisanen 4691c37c6b Change static variables to class members
Some variables were still defind as static in sources but as drivers
are now C++ classes, these variables should be members of the class.
2018-04-19 12:07:32 +03:00
Kimmo Vaisanen a8fef8fbee Remove product specific variables and target flags
Since variant detection is using ant_switch pin, it is now only used if that pin
has been connected. Otherwise generic variant code is used.
2018-04-11 14:54:11 +03:00
Antti Kauppila c5ee52293f Added flagging for DEVICE_SPI 2018-03-11 11:35:20 +02:00
Antti Kauppila ad7fc427e0
Merge pull request #12 from ARMmbed/fix_iar_compiler_warnings
Fix IAR compiler warnings
2018-03-08 14:16:35 +02:00
Kimmo Vaisanen 87335ab5e7 Fix IAR compiler warnings
preamble_detected and sync_word_detected are uint8_t integer type variables so those should not be compared to (boolean) true/false values.

Fixed to use 1 and 0 values instead.
2018-03-08 14:11:22 +02:00
Hasnain Virk 94b11beea5 Checking for pins being NC before writing
NXP Hal provides a write API on DigitalOut::write() that asserts if pin
is NC and we try to perform an operation on it. This behaviour is not
consistent among various Hals in Mbed-OS. However, we now check the pin
ourselves in the driver just like 1276.
2018-02-19 13:31:01 +02:00
Kimmo Vaisanen 247d8a5777 Add TCXO pin for SX1272
Also reformatted constructor params list to more readable format
2018-02-15 14:34:13 +02:00
Kimmo Vaisanen e5bd56e0fc Enable TCXO always if pin is defined 2018-02-14 12:43:24 +02:00
Kimmo Vaisanen 9f2ad37f4f Change WISE-1510 target to new name 2018-02-09 17:08:20 +01:00
Hasnain Virk 6f45d34e04 Fixing paths to LoRaRadio and warnings
LoRaRadio is now moved to feature/lorawan from feature/netsocket.
2018-02-09 12:34:46 +02:00
Kimmo Vaisanen cfa70a7e40 Add MTB_MTS_XDOT target 2018-02-07 11:04:49 +02:00
Kimmo Vaisanen b520b5a702 Set up DIO4 and 5 interrupts only if pins are connected
For example muRata modules do not have DIO4 and DIO5 pins connected.
If these pins are not connected, driver should not try to set up
interrupt handlers for those.
2018-02-02 09:37:18 +02:00
Kimmo Vaisanen 7407a282fb Use PA_BOOST for WISE-1510 module 2018-01-23 16:43:49 +02:00
Kimmo Vaisanen 863decda18 Enable PA_BOOST for xDOT module 2018-01-09 12:49:53 +02:00
Kimmo Vaisanen 63b5c8453e Add support for Multitech xDot module
xDot module does not have external antenna control pins nor DIO5
pin connected.
2018-01-04 14:20:38 +02:00
Hasnain Virk fe00a1c55b
Merge pull request #3 from ARMmbed/radio_event_callbacks
[IOTCELL-284] Removing NULL checks from Callbacks
2018-01-04 12:40:29 +02:00
Hasnain Virk c882dd6e6e [IOTCELL-284] Removing NULL checks from Callbacks
In respose to the radio event callback change from c style callbacks
to Mbed callbacks, we need to remove NULL checks from the driver code
as the callbacks itself are not pointers anymore. However, thanks to
template magic, we can check if callback is assigned or not. If its not
not assigned, it is default constructed to NULL which we can check by boolean
operator.
2018-01-03 17:15:29 +02:00
Hasnain Virk 31eeb63bed
Merge pull request #2 from ARMmbed/bug_fix
Buffer Size and missing terminator for SX127 class
2017-12-18 15:08:08 +02:00
Hasnain Virk 6f039691d7 Buffer Size and missing terminator for SX127 class
For some unknown reason (may be a rebase issue) Mbed config name for the
drivers was not spell correctly inside the source macro definition.
Alongwith that the SX1276 driver was missing a class terminator.
2017-12-18 15:05:46 +02:00
Hasnain Virk d7e60e443a
Merge pull request #1 from ARMmbed/ns_pollution
Removing namespace pollution & rf ctrls refactor
2017-12-15 11:06:19 +02:00
Hasnain Virk 622d50b56d Removing namespace pollution & rf ctrls refactor
rf_ctrls is a data structure that holds all control pins for a certain LoRa Radio.
Same data structure was being used in both SX1272 and SX1276 drivers. As we are
heading towards putting both drivers in the same repo and as the plan is to use them
togather, i.e., both header files could be included we need to move this data structure to a
common location so that the name does not collide.

In addition to that we have tried to reduce namespace pollution caused by the driver
header files.
2017-12-15 10:50:24 +02:00
Antti Kauppila 0d536766be Initial commit 2017-12-04 09:47:58 +02:00