zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.52k stars 6.45k forks source link

tests: driver: drivers.uart.async_api.lpuart: mimxrt10xx_evk: hardfault #71983

Open hakehuang opened 4 months ago

hakehuang commented 4 months ago

This issue list is only for bugs in the main Zephyr code base (https://github.com/zephyrproject-rtos/zephyr/). If the bug is for a project fork (such as NCS) specific feature, please open an issue in the fork project instead.

Describe the bug tests/drivers/uart/uart_async_api meet hardfault

Please also mention any information which could help others to understand the problem you're facing:

a5cf757c9ecbaa562a4f31b58bf133a4b978da8a is the first bad commit
commit a5cf757c9ecbaa562a4f31b58bf133a4b978da8a
Author: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
Date:   Wed Jun 14 09:38:41 2023 +0700

    drivers: dma_mcux_edma: improve interrupt handling

    The current implementation iterates over all channels
    even if only several channels share the same irq. This
    introduces one more dt property to describe an offset
    between two channels share the same interrupt id.

    Beside that, the error interrupt must be put as last
    element of "interrupt" dt property.

    Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>

 drivers/dma/dma_mcux_edma.c         | 105 ++++++++++++++++++------------------
 dts/arm/nxp/nxp_rt10xx.dtsi         |   1 +
 dts/arm/nxp/nxp_rt11xx.dtsi         |   2 +
 dts/bindings/dma/nxp,mcux-edma.yaml |   7 +++
 4 files changed, 61 insertions(+), 54 deletions(-)

To Reproduce Steps to reproduce the behavior:

west twister -p mimxrt1010_evk -T tests/drivers/uart/uart_async_api

Expected behavior

PASS

Impact

DMA issue iwth lpuart in this platform. (other RT series is ok including RT1015)

Logs and console output

*** Booting Zephyr OS build v3.6.0-3046-g78150c8e1b2c ***
Running TESTSUITE uart_async_chain_read
===================================================================
E: No buffers to release from RX DMA!
E: No buffers to release from RX DMA!
START - test_chained_read
E: 0x60011a50 used before initialization
E: syscall z_vrfy_uart_rx_enable failed check: access denied
E: r0/a1:  0x00000000  r1/a2:  0x00000000  r2/a3:  0x00000000
E: r3/a4:  0x00000000 r12/ip:  0x00000000 r14/lr:  0x00000000
E:  xpsr:  0x00000000
E: Faulting instruction address (r15/pc): 0x3f750880
E: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
E: Current thread: 0x20002840 (test_chained_read)
E: Halting system

Environment (please complete the following information):

hakehuang commented 4 months ago

this is a long missing issue, I misjudge rt1015 and rt1010 use the same ip, and rt1015 is ok which misleading me as my board settings issue. but after some analysis, this is a dma issue.

decsny commented 3 months ago

I confirmed that it fails on all the other RT10xx boards as well.

github-actions[bot] commented 1 month ago

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

dleach02 commented 1 month ago

ping @EmilioCBen