Go to file
Laurentiu Mihalcea ae082064ff drivers: dai: sai: write some data into TX FIFO before start
While running the following command:

	aplay ... | arecord ...

multiple times, it was discovered that the SAI transmit
FIFO goes into underrun. This only happened in the
beginning, a few BCLK cycles after unmasking the transmit
data line. With the following flow:

	1) Trigger start on RX
		a) Do TX and RX software reset
		b) Enable RX FIFO error interrupt
		c) Enable RX DMA requests
		d) Enable receive data line
		e) Enable transmitter
		f) Enable receiver

	    ..... some time has passed .....

	2) Trigger start on TX
		a) Enable DMA requests
		b) Enable transmit data line

and configuration in mind:

	1) RX is SYNC with TX
	2) TX is ASYNC
	3) Each FSYNC edge is 32-bit wide
	4) Each frame contains 2 32-bit words

this points to the following possibilites:

	1) The transmitter is enabled so close to the
	start of a new frame that even though the DMA requests
	are asserted, the DMAC doesn't have enough time
	to service them until the module goes into underrun
	=> the timing is bad.

	2) The transmitter is enabled somewhat close to
	the start of a new frame such that the DMAC is not
	fast enough to service the module until it goes into
	underrun => DMAC is too slow AND the timing is bad.

Although the exact cause was not pinpointed, this patch
aims to fix the problem by writing a frame's worth of 0s
in the transmit FIFO. This way, even if we're dealing with
scenario 1) or 2), the DMAC has plenty of time to perform
the transfer (i.e: a frame), thus avoiding the underrun.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-05-17 12:40:43 +02:00
.github ci: codecov: Add upload token for codecov action 2024-05-14 20:26:44 -04:00
arch arch: arm: rom_start relocation configuration 2024-05-16 15:52:20 +02:00
boards boards: renesas: Add configuration for BT 2024-05-16 18:58:00 -04:00
cmake toolchain: llvm: Allow TLS when using llvm targeting arm 2024-05-14 09:43:37 +02:00
doc doc: release-notes-3.7: Removed PCIe APIs 2024-05-17 09:30:04 +02:00
drivers drivers: dai: sai: write some data into TX FIFO before start 2024-05-17 12:40:43 +02:00
dts drivers: sensor: add Innovative Sensor Technology TSic xx6 driver 2024-05-16 18:57:24 -04:00
include/zephyr net: lib: coap_client: Improve cancel function 2024-05-17 10:34:12 +02:00
kernel kernel: mmu: shrink and align struct z_page_frame 2024-05-13 16:04:40 -04:00
lib shell: devmem: address cmd_dump multiple call problem 2024-05-15 10:13:23 +02:00
misc cmake: modules: dts: use devicetree stub file 2023-10-20 12:18:17 -07:00
modules modules hal_nordic: Handle appropiately new kconfig options 2024-05-16 15:19:08 +01:00
samples samples: net: echo_server: set IPV6_V6ONLY 2024-05-17 11:12:43 +02:00
scripts twister: Fix path to binary location for unit_testing board 2024-05-16 14:27:06 +02:00
share sysbuild: cmake: fix incorrect function name in error message 2024-05-04 12:59:51 +03:00
snippets snippets: nus-console: Redirect Shell to nus-console 2024-04-29 15:49:53 +02:00
soc drivers: clock_control: Smartbond: Add runtime frequency support 2024-05-17 09:29:58 +02:00
submanifests modules: nanopb: Pull upstream fixes 2024-05-07 21:22:43 -04:00
subsys net: lib: coap_client: Improve cancel function 2024-05-17 10:34:12 +02:00
tests tests: socket: udp: reduce SO_PRIORITY from 8 to 6 for NSOS compatbility 2024-05-17 11:12:43 +02:00
.checkpatch.conf checkpatch: ignore EXPORT_SYMBOL 2024-04-05 12:19:36 +02:00
.clang-format Revert "clang-format: add entry for SYS_SEM_LOCK()" 2024-04-23 11:51:44 -04:00
.codecov.yml
.editorconfig
.gitattributes
.gitignore hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
.gitlint gitlint: do not allow treewide as an area in commit messages 2024-04-10 09:22:24 +02:00
.mailmap mailmap: sort alphabetically 2023-05-15 13:23:32 -04:00
.yamllint
CMakeLists.txt linker: decouple KERNEL_WHOLE_ARCHIVE from LLEXT 2024-05-13 14:23:38 +02:00
CODE_OF_CONDUCT.md coc: Update Code of Conduct to latest Contributor Covenant 2023-12-21 09:38:23 +00:00
CODEOWNERS drivers: ad559x: add i2c bus support 2024-04-01 12:18:47 -05:00
CONTRIBUTING.rst
Kconfig
Kconfig.zephyr buildsystem: Add an option to compress debug sections 2024-05-13 14:23:12 +02:00
LICENSE
MAINTAINERS.yml MAINTAINERS: Add ubieda to sensor drivers collaborator 2024-05-17 09:29:06 +02:00
README.rst doc: README: Rework Resources section 2023-10-17 19:05:20 +03:00
SDK_VERSION SDK_VERSION: Use Zephyr SDK 0.16.5-1 2024-03-12 08:54:42 -04:00
VERSION release: Zephyr v3.6.99 2024-02-23 22:28:57 -06:00
version.h.in version: cmake: kconfig: introduce extra <type>_VERSION_<x>_STRING 2024-02-01 10:28:43 +00:00
west.yml west.yml: Update revision for hal_renesas 2024-05-16 18:58:00 -04:00
zephyr-env.cmd
zephyr-env.sh

.. raw:: html

   <a href="https://www.zephyrproject.org">
     <p align="center">
       <picture>
         <source media="(prefers-color-scheme: dark)" srcset="doc/_static/images/logo-readme-dark.svg">
         <source media="(prefers-color-scheme: light)" srcset="doc/_static/images/logo-readme-light.svg">
         <img src="doc/_static/images/logo-readme-light.svg">
       </picture>
     </p>
   </a>

   <a href="https://bestpractices.coreinfrastructure.org/projects/74"><img
   src="https://bestpractices.coreinfrastructure.org/projects/74/badge"></a>
   <a
   href="https://github.com/zephyrproject-rtos/zephyr/actions/workflows/twister.yaml?query=branch%3Amain">
   <img
   src="https://github.com/zephyrproject-rtos/zephyr/actions/workflows/twister.yaml/badge.svg?event=push"></a>


The Zephyr Project is a scalable real-time operating system (RTOS) supporting
multiple hardware architectures, optimized for resource constrained devices,
and built with security in mind.

The Zephyr OS is based on a small-footprint kernel designed for use on
resource-constrained systems: from simple embedded environmental sensors and
LED wearables to sophisticated smart watches and IoT wireless gateways.

The Zephyr kernel supports multiple architectures, including ARM (Cortex-A,
Cortex-R, Cortex-M), Intel x86, ARC, Nios II, Tensilica Xtensa, and RISC-V,
SPARC, MIPS, and a large number of `supported boards`_.

.. below included in doc/introduction/introduction.rst


Getting Started
***************

Welcome to Zephyr! See the `Introduction to Zephyr`_ for a high-level overview,
and the documentation's `Getting Started Guide`_ to start developing.

.. start_include_here

Community Support
*****************

Community support is provided via mailing lists and Discord; see the Resources
below for details.

.. _project-resources:

Resources
*********

Here's a quick summary of resources to help you find your way around:

Getting Started
---------------

  | 📖 `Zephyr Documentation`_
  | 🚀 `Getting Started Guide`_
  | 🙋🏽 `Tips when asking for help`_
  | 💻 `Code samples`_

Code and Development
--------------------

  | 🌐 `Source Code Repository`_
  | 📦 `Releases`_
  | 🤝 `Contribution Guide`_

Community and Support
---------------------

  | 💬 `Discord Server`_ for real-time community discussions
  | 📧 `User mailing list (users@lists.zephyrproject.org)`_
  | 📧 `Developer mailing list (devel@lists.zephyrproject.org)`_
  | 📬 `Other project mailing lists`_
  | 📚 `Project Wiki`_

Issue Tracking and Security
---------------------------

  | 🐛 `GitHub Issues`_
  | 🔒 `Security documentation`_
  | 🛡️ `Security Advisories Repository`_
  | ⚠️ Report security vulnerabilities at vulnerabilities@zephyrproject.org

Additional Resources
--------------------
  | 🌐 `Zephyr Project Website`_
  | 📺 `Zephyr Tech Talks`_

.. _Zephyr Project Website: https://www.zephyrproject.org
.. _Discord Server: https://chat.zephyrproject.org
.. _supported boards: https://docs.zephyrproject.org/latest/boards/index.html
.. _Zephyr Documentation: https://docs.zephyrproject.org
.. _Introduction to Zephyr: https://docs.zephyrproject.org/latest/introduction/index.html
.. _Getting Started Guide: https://docs.zephyrproject.org/latest/develop/getting_started/index.html
.. _Contribution Guide: https://docs.zephyrproject.org/latest/contribute/index.html
.. _Source Code Repository: https://github.com/zephyrproject-rtos/zephyr
.. _GitHub Issues: https://github.com/zephyrproject-rtos/zephyr/issues
.. _Releases: https://github.com/zephyrproject-rtos/zephyr/releases
.. _Project Wiki: https://github.com/zephyrproject-rtos/zephyr/wiki
.. _User mailing list (users@lists.zephyrproject.org): https://lists.zephyrproject.org/g/users
.. _Developer mailing list (devel@lists.zephyrproject.org): https://lists.zephyrproject.org/g/devel
.. _Other project mailing lists: https://lists.zephyrproject.org/g/main/subgroups
.. _Code samples: https://docs.zephyrproject.org/latest/samples/index.html
.. _Security documentation: https://docs.zephyrproject.org/latest/security/index.html
.. _Security Advisories Repository: https://github.com/zephyrproject-rtos/zephyr/security
.. _Tips when asking for help: https://docs.zephyrproject.org/latest/develop/getting_started/index.html#asking-for-help
.. _Zephyr Tech Talks: https://www.zephyrproject.org/tech-talks