Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RT6XX I2S test fails after d92d1f162af3ba24963f1026fc0a304f1a44d1f3 #38078

Closed
mmahadevan108 opened this issue Aug 27, 2021 · 8 comments · Fixed by #38183
Closed

RT6XX I2S test fails after d92d1f162af3ba24963f1026fc0a304f1a44d1f3 #38078

mmahadevan108 opened this issue Aug 27, 2021 · 8 comments · Fixed by #38183
Assignees
Labels
area: I2S bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP priority: low Low impact/importance bug

Comments

@mmahadevan108
Copy link
Collaborator

Describe the bug
The I2S test tests/drivers/i2s/i2s_speed starts to fail after commit: d92d1f1

To Reproduce
Steps to reproduce the behavior:

  1. mkdir build; cd build
  2. cmake -DBOARD=board\mimxrt685_evk_cm33
  3. make
  4. See error

Expected behavior
The test should pass

Logs and console output
Below failure is seen on the console output:

E: ***** BUS FAULT *****
E:   Precise data bus error
E:   BFAR Address: 0xc5970e48
E: r0/a1:  0x301822c4  r1/a2:  0x00000000  r2/a3:  0xc5970e48
E: r3/a4:  0x00000001 r12/ip:  0x00000000 r14/lr:  0x18006e55
E:  xpsr:  0x41000000
E: Faulting instruction address (r15/pc): 0x18009b62
E: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
E: Current thread: 0x30180e10 (test_i2s_transfer_short)
E: Halting system

Environment (please complete the following information):

  • OS: Linux
  • Toolchain: e.g Zephyr SDK
  • Commit SHA: 8b13046
@mmahadevan108 mmahadevan108 added the bug The issue is a bug, or the PR is fixing a bug label Aug 27, 2021
@mmahadevan108
Copy link
Collaborator Author

cc @hakehuang @MaureenHelm @dleach02

@MaureenHelm
Copy link
Member

Is the driver assuming initialized memory allocation?

@mmahadevan108
Copy link
Collaborator Author

@dcpleung any suggestions for this issue we are seeing the I2S tests

@dcpleung
Copy link
Member

That's weird... as far as I can tell, the test does not use k_heap.

As for the assert, did it return -EIO or -EAGAIN? Given the debug message above saying need retry, I am assuming -EAGAIN. If this is the case, maybe the timeout in the driver is not long enough? Could you try to loop the call to i2s_mcux_read() just above the assertion a few times to see if it goes through? I don't have anything hardware on hand to test I2S so I can't debug this locally.

@mmahadevan108
Copy link
Collaborator Author

The test uses k_mem_slab. Would this change have an impact?

@dcpleung
Copy link
Member

K_MEM_SLAB_DEFINE() is not backed by k_heap. There doesn't seem to be any connection to the failure.

My guess is that this may be due to memory alignment. The k_heap change moves other symbols around in memory. That commit might cause issue if the hardware requires certain memory alignment of the buffers. If this is indeed the case, we have been lucky so far on the test, as adding one uint32_t might have broken the test.

@mmahadevan108
Copy link
Collaborator Author

Thank you, I was able to find a fix.

@mmahadevan108
Copy link
Collaborator Author

Issue has been fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: I2S bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants