- 08 Aug, 2021 36 commits
-
-
Jordan Yates authored
Add tests to ensure that conversions remain linear for large time deltas when no skew is present. Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
-
Jordan Yates authored
Fix conversion drifts for large deltas by only applying float operations when the skew requires it. This helps because not all integers are representable as floats, so large integers are neccessarily quantised when performing float operations. When required, floating-point operations are now performed on doubles instead of floats. Fixes #37263. Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
-
Jordan Yates authored
Make the `lora_recv` operation thread safe by copying memory directly in the callback instead of deferring copying to the original caller. To ensure pointer validity, this requires performing operations "inside" the `modem_release` context. Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
-
Jordan Yates authored
Ensure that the modem is not asked to perform new operations before the previous operation completes. An atomic variable is used instead of a mutex as multiple threads need to release the lock. A semaphore isn't used as there is no indication whether `k_sem_give` gives the semaphore or not, which is required to determine if `Radio.Sleep()` should be run. `Radio.Sleep()` is only ever run by the context that successfully releases the modem usage, to guard against double calls. Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
-
Jordan Yates authored
Transition the receive synchronisation method from a single driver semaphore to a function specific k_poll_signal. This is required to allow the modem to be released without introducing race conditions on the signalling mechanism. Without this change, the RX can either be signalled before the modem is released, unblocking the calling thread before the modem is put back to sleep, or after the modem is released, in which case a second thread could start using the semaphore before the original thread is signalled. Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
-
Jordan Yates authored
If no packet was received in the provided timeout, manually transition to sleep mode. If a packet was received, the rx_done callback automatically transitions the modem to sleep. Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
-
Jordan Yates authored
The timeout parameter for `lora_recv` is no longer a millisecond value but a standard `k_timeout_t` value. Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
-
Piotr Pryga authored
Remove compilation warning about adv_sync_pdu_ad_data_set function that is defined but not used. Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
-
Piotr Pryga authored
Bluetooth host may request to send more than one CTE in connectionless mode. That is relized by periodic advertising chained PDUs. To check correctness of implementation of such functionality new unit tests were added. Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
-
Piotr Pryga authored
Direction finding functionality allows to send a number of periodic advertising PDUs in a chain that have CTE. Disable sending CTE requiers additional steps while removing cte_info from periodic advertising chains. Removal of cte_info fields may be just delete of that filed from extended advertising header. In case the PDUs are empty PDUs created just to transport CTE. Those PDUs should be removed from a periodic advertising chain. Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
-
Piotr Pryga authored
Add release of chained PDUs by lll_adv_pdu_and_extra_data_- latest_get function. It is requier to release unused PDUs from a chain to avoid PDUs leakage. It maight happen when chained PDUs were used by Direction Finding, then lll_adv_pdu_and_extra_data_lates_get is used instead of lll_adv_pdu_lates_get. Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
-
Piotr Pryga authored
To check if advertising PDU is empty we can compare its length to 1. To avoid use of magic number, the commit provides a macro for that purpose. Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
-
Piotr Pryga authored
Direction finding functionality allows to send a number of periodic advertising PDUs in a chain that have CTE. ll_df_set_cl_cte_tx_enable function was changed to update periodic advertising chain to include cte_info field. If the chain is too short, there is less PDUs in the chain than requested number of CTEs, the function will add new empty PDUs to the chain end. Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
-
Piotr Pryga authored
Enabling or disabling transmission of Constant Tone Extension with periodic advertising PDUs requires update of a PDU content. CTE_INFO field of periodic advertising PDU must be filled with appropriate data. That operation may be done for periodic advertising PDU (or chain of PDUs) filled with other payload that wasn't enqueued towards LLL. In that situation PDUs are updated in place, to avoid increase of memory consumption. The commit changes ull_adv_sync_pdu_set_clear function to make possible update of the advertising PDU in place. Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
-
Piotr Pryga authored
Some functions, provided to handle changing content of periodic advertising PDUs, were defined as static. Code responsible for handling direction finding updates periodic advertising PDUs also. For that purposes, those functions were mede globally accessible. Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
-
Piotr Pryga authored
Add configuration of CTE for periodic advertising chain transmission. The commit provides configuration of radio in prepare stage and in handle of Tx ISR. CTE is configured only for PDUs that have cte_info field in extended advertising header. During prepare of periodic advertising event there are updated aux_ptr fields in extended advertising header in other PDUs from a periodic advertising chain. aux_ptr offset value also depends on CTE length. CTE configuration is always the same for every PDU in periodic advertising chain. CTE may be added to requested number of PDUs in periodic advertising chain. Although it is possible that there are PDUs that don't have CTE. PDUs that have CTE are alsways at the beginning of a periodic advertising chain. Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
-
Piotr Pryga authored
Configuration of CTE for transmission is stored in extra_date member of a lll_adv_sync object. PDUs in periodic advertising chain share the same CTE configuration, so there is single instance of the extra_data. To configure CTE transmission for every PDU in periodic advertising chain a new function was introduced to peek extra_data instance without peeking new PDU. Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
-
Piotr Pryga authored
Add const qualifier in radio API related with setting antenna switch pattern. Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
-
Piotr Pryga authored
Transmission of Constant Tone Extension is done after END event triggered by radio. To correctly switch from TX to TX (back 2 back TX) after transmission of CTE PHYEND event must be used instead of END event. The commit provides required function that allows LLL to correctly setup radio to do back to back switch of TX when CTE transmission is enabled. The radio_switch_complete_and_phy_end_b2b_tx cannot be implemented in radio.c source file. It will fail build of unit tests targeted for NRFBSIM simulator board. There is no RADIO_SHORTS_PHYEND_DISABLE_Msk macro defined in bsim_hw_models module. Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
-
Piotr Pryga authored
Amount of memory allocated for advertising PDUs (including periodic advertising) depends on two factors: - maximum advertising data length - maximum number of CTE in a periodic advertising chain. Maximum advertising data length is divided by maximum size of a single fragment (number of payload bytes that single advertising PDU may hold) to get required number of fragments. Actual number of PDUs allocated for advertising is maximum of acutal number of advertising payload fragments and maximum number of CTEs. Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
-
Piotr Pryga authored
Add possiblity to configure maximum number of PDUs with Constant Tone Extension in a single periodic advertising chain. Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
-
Mulin Chao authored
Add 'Nuvoton_Numicro Platform' section for Nuvoton Numicro family of processors. Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
-
Mulin Chao authored
Replace the suffix "nuvoton" with "numicro" for Nuvoton microcontroller serial driver. Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
-
Mulin Chao authored
We try to reduce the ambiguity between 'soc/nuvoton/' and 'soc/nuvoton_npcx' folders. Most if soc vendors name their soc folder by the company name with SOC_FAMILY suffix instead of the company name directly. It is clearer if the soc company has different product lines that aim to specific markets. In this CL, the 'numicro' suffix is used for Nuvoton Microcontroller production line. It distinguishes the 'npcx' suffix that used for Nuvoton Embedded Controller (EC) of Notebook PC product line. Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
-
Mulin Chao authored
This CL renames 'Nuvoton Platform' as 'Nuvoton_NPCX Platform' and modifies the relevant files used by this platform. It also changes status from 'orphaned' to 'maintained' since we do maintain npcx drivers continuously. Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
-
Dino Li authored
This allows board to re-configure ROM_BASE address while building firmware image. For example, a board need to build two firmware images. And the images are put into one flash and required to work independent: config FLASH_LOAD_OFFSET default 0 if FIRST_IMAGE default 0x80000 if SECOND_IMAGE Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
-
Evgeniy Paltsev authored
Increase default stacks sizes for 64bit platforms where it is required. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
-
Evgeniy Paltsev authored
Add nsim_hs6x_smp simulation board (nSIM based) with 2 cores ARCv3 HS6x CPU. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
-
Evgeniy Paltsev authored
ARCv3 has ARConnect implementation similar to ARCv2, so use existing ARConnect header for ARCv3 as well. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
-
Evgeniy Paltsev authored
Rewrite ARC SMP code with ASM-compat macros so it can be used for ARCv3 64 bit. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
-
Yuval Peress authored
Add bindings and entry for the battery-backed ram in the nuvoton npcx. This commit is an upstream port of https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/dts/bindings/cros_bbram/nuvoton,npcx-cros-bbram.yaml;l=1;drc=e9af813c36b7b411bf2a01cbc1b09d5fdec49b8a Along with a bit of cleaning up and an emulator. Signed-off-by: Yuval Peress <peress@chromium.org>
-
Przemyslaw Bida authored
This commit adds capability to disable CSL sampling by setting CSL period to 0. Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
-
Fabio Baltieri authored
Current location options for linker source files includes init and noinit ram data, but only a noinit ram section. This makes it impossible for application code to define an initialized RAM output section, such as with the Z_ITERABLE_SECTION_RAM() helpers. Adding a DATA_SECTIONS linker source option for this use case. Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
-
Scott Worley authored
Fixes issue 34879 This PR updates previous PR's 37138 and 37139. Refer to issue 34879 for information from MCHP HW designers. A delay after enabling interrupts is a more appropriate work-around than depending upon behavior of ARM DMB instruction. Signed-off-by: Scott Worley <scott.worley@microchip.com>
-
Martí Bolívar authored
The main motivation is to avoid polluting the all-caps "DT_" namespace, which within zephyr belongs to devicetree.h. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
-
Ramesh Babu B authored
Socket CAN does not require interface link address to be assigned, check is not applicable for socket CAN interfaces. As this address is NULL for socket CAN interface it results in assertion. Signed-off-by: Ramesh Babu B <ramesh.babu.b@intel.com>
-
- 07 Aug, 2021 4 commits
-
-
Gerard Marull-Paretas authored
Use the internal function z_device_get_all_static helper function instead of using __device_start and __device_end directly. Some other minor adjustments have been done (e.g. reduce *dev scope to the for loop). An issue on the range of the for loop in _pm_devices has also been fixed. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
-
Gerard Marull-Paretas authored
The shared _pm_devices function used should_suspend check function to see if a device had to be suspended or not. Some of the logic inside that function was redundant since the pm_device_state_set function already performs similar checks, e.g. if the device is already at the given state or the state transition is not supported it will return error codes appropriately. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
-
Gerard Marull-Paretas authored
A device that is turned off should not be suspended. A device that has been turned off can only be resumed. This action is currently forbidden by the "should_suspend" function in the device PM code. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
-
Felipe Neves authored
By appending the right link layer controller configurarion Signed-off-by: Felipe Neves <felipe.neves@espressif.com>
-