-
Notifications
You must be signed in to change notification settings - Fork 592
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
os/board/rtl8730e: add driver layer implemenation for i2s tdm #6541
base: TDM_Dev
Are you sure you want to change the base?
Conversation
8188501
to
1cf7b9d
Compare
Add initial porting/os layer commit - TDM parameters fixed on I2S2 to generate required signal for AIS25BA - DMA is not tested and likely requires further implementation Config: - RTL8730E Peripheral Support: [ ] AMEBASMART_I2C [*] Amebasmart I2S [*] I2S_2 [*] Enable I2S RX [*] Enable I2S TDM Support - Device Drivers: [ ] I2C Driver Support [*] I2S Driver Support - Application Configuration > Examples: [*] I2S character driver test [*] Use I2S receiver [ ] Use I2S transmitter /dev/i2schar4 I2S character device path
1cf7b9d
to
058db6b
Compare
Fix clock selection parameters to get targeted signal value: MCLK = 12.288MHz (OK) BCLK = 2.048MHz (OK) WCLK (need to setup Rx api in order to trigger WCLK activity)
MCLK/BCLK signal observed with LA and verified to be within parameters |
- WCLK was not started because there was no I2S and DMA transaction being started, added calls to relevant APIs - Currently DMA for I2S TDM is not properly initialized and will hardfault when rx page, currently under investigation - User is required to call I2S_RESUME and I2S_PAUSE macros when attempting a TDM operation (e.g READ), as these macros will start WCLK (for MASTER mode) - Add some debug logging and revert changes to irrelevant files
Pin allocation is adjusted for TDM functionality - please refer to email chain for rework steps for first board revision (Dec 2024) Please note that as a result of this change, a new pinmux configuration needs to be maintained for TDM only! - PB29 (previously I2C0 SDA) --> I2S2 DIN0 - PA30 [or PB5] (previously unconnected) --> I2C0 SDA - PB20 (previously I2S2 DIN0) --> Unconnected
This commit completes the DMA portion of the I2S implementation and allows for receive of data based on AIS25BA sensor TDM signal specification Please note that if TDM board v1 (Dec 2024) is used, rework is required! To test, build with AIS25BA sensor example and use "sensor" command in TASH
I2C2 pins (PB10, PB11) are used instead of existing I2C0, pinmux change is updated. Verified working on TDM board for PoC
TDM RX will keep PM lock until DMA transfer is complete, then release the lock in ISR Verified on TDM board by removing delay causing tash to sleep instantly, then use pm_resume to enable board to sleep. While asleep, run sensor test command
PM for I2S TDM sample output:
|
Hi Henry, I have taken this PR, it gives build error . |
…bility of TDM Parameters to setup TDM are now configured from amebasmart_i2s.c OS layer, there is currently no error handling if clock setting is invalid MCLK in i2s_clock_select is also currently fixed until a better way to configure it is found
1ef110a
to
a732e88
Compare
Hi @anjana348 it has been updated, but please double check the following during build as well: [ ] Enable I2S TX // Disable this in menuconfig |
Add initial porting/os layer commit
Config: