Crash was observed if "diag stop" was invoked during the transmission.
The issue was caused by an update to otPlatRadioSleep that made it
compilant with the documentation and not allowing direct Transmit to
Sleep transition.
The transmission result was forwarded to OpenThread making it crash due
to an invalid state.
Signed-off-by: Marek Porwisz <marek.porwisz@nordicsemi.no>
Add missing doxygen docs for the NXP FlexIO driver and "mount" into the
Misc. drivers doxygen group.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit adds specific DMA configuration for STM32N6xx.
STM32N6xx uses GPDMA for SAI as STM32U5xx/U3xx/H5xx/H7RS etc.
In constrast to these series, STM32N6xx DMA requires a secure
and privileged channel.
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
Use an asynchronous clock with an increased prescaler value for the ADC of
the Nucleo C031C6 so that the adc_sequence sample runs correctly.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
Use proper Doxygen commands so that 100% of the
andes_flash_xip_api_ex.h header is documented.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use proper Doxygen commands so that 100% of the
ra_flash_api_extensions.h header is documented.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use proper Doxygen commands so that 100% of the rts5912_flash_api_ex.h
header is documented.
Note that this uncovers weird usage of in vs. out parameters in the
various functions and might be worth a cleanup as a follow-up.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Use proper Doxygen commands so that 100% of the
stm32_flash_api_extensions.h header is documented.
Removed unnecessary #ifdefs since enums needed not to be guarded from
declaration in the context of the header file.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add a new Doxygen group for vendor-specific extended operations so that
they can all be properly documented and show up in one place.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
It was observed in a project that when an error transaction occurs,
printing the error message can delay resetting the SHI state machine and
initializing the output buffer, which may cause the subsequent
transaction to fail, especially during stress tests involving heavy host
command communication.
This commit changes some error log level from ERR to DBG to prevent the
condition above from happening.
Also change the default debug level for the SHI driver to LOG_LEVEL_ERR.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Add a workaround for `NRF53_ERRATA_159_ENABLE_WORKAROUND`
instead of simply printing an error and failing the transaction.
Signed-off-by: Anthony Williams <anthony289478@gmail.com>
The test attempts to register an ISR for an IRQ
used by a device driver on this platform.
This breaks builds of the test and makes CI red.
Temporarily exclude all C0-based platforms from
the test until a clean solution is implemented.
Signed-off-by: Mathieu CHOPLAIN <mathieu.choplain@st.com>
Add a test case test_sdp_discover_with_range to test the ssa request
with attribute ID range with the following test steps.
Step 1, Discover all included attribute IDs,
Step 2, Set the start of range from 0 to (max value + 9) of the
discovered attribute ID,
Step 3, Set the end of range from start of range to (max value + 9)
of the discovered attribute ID.
step 4, Send SSA request with the specific attribute ID range,
Step 5, check the discovery result according to the range,
Step 6, repeat step 4 - 5 until the range to
(max value + 9, max value + 9).
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
If the range of the service search attribute request is set and the
start of the range is not 0x0000, the response data of the request is
not valid. It is caused by the data element sequence has not be added
to response data. The client cannot parse the response data properly.
The root cause of this issue is that the total length of service
record will be added only when adding the first attribute of service
record.
Fix the issue by reset the `state.last_att` and `state.last_att_index`
if the index of current record is not same with `state.current_svc`.
And do not update `state.last_att`, `state.last_att_index`, and
`state.current_svc` in the function `select_attrs()`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
In current implementation, the received buffer is incorrectly used for
other SDP discover requests.
Release the RX buffer when the SDP discovery is done. And allocate the
new RX buffer from the pool of the new SDP discovery request.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
This commit adds the spi3 node to the device tree for the
STM32MP257F-EV1 board. This node corresponds to the spi exposed by the
GPIO expansion connector [1].
[1]: https://wiki.st.com/stm32mpu/wiki/STM32MP257x-EV1_-_hardware_description
Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
Enable CAN1 and CAN2 in nucleo_f207zg.dts. Update supported
features in YAML and the board documentation accordingly.
Signed-off-by: Taeyoun Park <nvnv0422@gmail.com>
Add device deinit function. Support is optional as it is not widely
used and it enables pinctrl sleep state so it impacts memory footprint.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
When PM or PM_DEVICE is enabled pinctrl sleep state is using for
device suspension. However, there are cases where power management is
not used but we still want to be able to put pins to sleep state, e.g.
device deinit.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
On Windows and Linux, the stm32cubeprogrammer runner will use
STM32_Programmer_CLI from PATH if it is available, but this was not
implemented on macOS. Add PATH lookup for macOS as well, using the same
approach as Windows and Linux.
Fixeszephyrproject-rtos/zephyr#93056
Signed-off-by: Garrett L. Ward <glward@glward.net>
A bit of doxygen love to this header to improve documentation coverage,
mainly focusing on missing documentation for a few enumerations, as well
as making sure javadoc-style comments are used where appropriate.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Fix two issues with the SAI TX Stream.
1. Drain command does not release the last memory buffer
2. TX Stream status does not change to READY after STOPPING
Signed-off-by: Mario Paja <mariopaja@hotmail.com>
Issue: the alarm 1 do not generate interrupt
There are three compare registers in a SAM TC channel:
RA --> alarm 0
RB --> alarm 1
RC --> top_value
By default the RB/TOIB was configured as an input and no longer
generates interrupt.
Set the direction of TIOB to output for alarm 1 interrupt.
Fixeszephyrproject-rtos/zephyr#85018
Signed-off-by: CHEN Xing <xing.chen@microchip.com>
- Fixes the flash module type used for MIMXRT1060-EVKC.
It has the 16MB w25q128jw flash module
- Fixes flash driver initialization failure for MIMXRT1060-EVKC.
- Older MIMXRT1060-EVK/EVKB have the 8MB is25wp064 flash module.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
GPIO interrupts do not work on MCXA, MCXA has ICR register but feature
FSL_FEATURE_GPIO_HAS_INTERRUPT_CHANNEL_SELECT value is 0, can't only use
this feature to support ICR. So adjust feature judgment.
Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
For better organization, split the Kconfig files into one per each CPU.
Also, there was a bug where MFD was made to depend on flexcomm being
enabled, when really it probably meant to just default y if flexcomm is
enabled.
Leave Kconfig.soc in one file for the SOC.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
We can both optimize and clean up the code by using short circuit logic
and static variables instead of stack variables.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Refactor ISR by:
1) making a helper function to put the tickful calculation in, to reduce
an indentation level and cognitively separate this case while reading
2) Rewrite the calculations to simplify them. More info on that below.
Math changes:
- In the ISR, there was a variable called "now" which represented the
current cycle count of the timer. last_count was updated using a
calculation based on the number of elapsed ticks
and the hardware cycles per second value. However, this is
redundant because mathematically, this is equivalent to "now". So the
variable can just be set to now.
Proof is that the previous calculation was (in programming language):
(1) last_count = last_count + elapsed_ticks * CYC_PER_TICK
So let's rewrite this as the following to be clear about the different
values we are talking about here (in math language):
(2) count[t] = count[t-1] + elapsed_ticks * CYC_PER_TICK
We calculated elapsed ticks in the function as:
(3) elapsed_ticks = (now - last_count) / CYC_PER_TICK
(4) elapsed_ticks = (now - count[t-1]) / CYC_PER_TICK
Rearranging (2), we see
(5) elapsed_ticks = ( count[t] - count[t-1] ) / CYC_PER_TICK
Substituting this into (4), we get:
(6) ( count[t] - count[t-1] ) / CYC_PER_TICK =
(now - count[t-1]) / CYC_PER_TICK
Doing simple algebra, you can see we result with:
(7) count[t] = now
So therefore, we can simplify the programming expression to
(8) last_count = now
- The other change is regarding the calculation of the next tick match
value for tickful kernel mode. The previous calculation was doing:
(1) next = now + CYC_PER_TICK
We know that last_count is equivalent to now, at this point in the code
with the first change:
(2) next = last_count + CYC_PER_TICK
And then, for some reason, we are adding yet another CYC_PER_TICK to
next if (next - now) < MIN_DELAY. The reason for that I do not
understand, but let's write that down:
(3) next - now < MIN_DELAY
Now rewrite (2) as (4) and (3) as (5):
(4) count[t+1] = count[t] + CYC_PER_TICK
(5) count[t+1] - count[t] < MIN_DELAY
And now we substitute (4) into (5):
(6) count[t] + CYC_PER_TICK - count[t] < MIN_DELAY
And simplify:
(7) CYC_PER_TICK < MIN_DELAY
So actually no runtime calculations are needed here, this is a
hardcoding. The reason for this calculation I don't know, but we can
simplify the code.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>