-
Notifications
You must be signed in to change notification settings - Fork 618
[BSP] os/arch/arm/src/amebasmart: TDM implementation for linked-list dma buff #6991
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
Conversation
zhongnuo-tang
commented
Oct 1, 2025
- includes changes in PR6969
- includes changes in PR6968
- fixed issue where data in app cannot be found in LA.
- All data printed in application can be found in LA, some data between two i2s receive are discarded because i2s clk is always on, it continue sampling but not callback to application layer.
1. includes changes in PR6969 2. includes changes in PR6968 3. fixed issue where data in app cannot be found in LA. 4. All data printed in application can be found in LA, some data between two i2s receive are discarded because i2s clk is always on, it continue sampling but not callback to application layer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We verified the PR.
the 17th data is not matched.
Also, since it's left justified TDM, so, we should set the 0x2E register value as 0x02.
+++ b/os/drivers/sensors/ais25ba.c
@@ -263,7 +263,7 @@ static void ais25ba_i2c_write_data(struct i2c_dev_s *i2c, struct i2c_config_s co
}
usleep(1000 *100);
reg[0] = 0x2E;
- reg[1] = 0x62;
+ reg[1] = 0x02;
ret = i2c_writeread(i2c, &config, (uint8_t *)reg, 2, data, 0);
if (ret != 2) {
sndbg("ERROR: I2C writeread failed, reg_addr: %p %p\n", reg[0], reg[1]);
Hi @namanjain7 could you share the mismatched data? |
Only 0x2E register value is changed to 0x02. Other code is same as the PR. Logs data: 0033 fef5 1ede 0034 ff00 1f07 ----> Mismatched data Sal data: 8.482544340000000,1,0x0033,0x00 ----> Mismatch from here. |
How many samples are correct? when you said 17th data does it mean 17th (512bytes) or 175h(16bytes)? |
1. linked list dma is used, page number is 16, page size now hard coded to sync with application of 512 bytes. So INT and EXT both use 256bytes. 2. When all dma page are full, data will be discarded instead of overwrite. 3. verified with printing only 4 frames in application, matched with LA. eg: app request 32*16 bytes, i will only print 4*16 bytes to avoid delays, then compare with LA data 4*16bytes.
|
Hi @namanjain7 , |
1. remove static buffer implementation
|
ALL data is correctly received and matched with sal graph. PR is working fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to merge , pass off the 1st step..
|
@zhongnuo-tang , ( cc to @namanjain7 ) To establish the codebase, I initially merged this PR; however, there is a mismatch in the data at frame 65. Eventually, when observing in LA, the data pattern can be found at frame 1600.
|
Hi @namanjain7 , |
|
I think we can easily resolve this problem by Increasing APB queue before starting TDM communication.. |
|
@zhongnuo-tang |
understood, please let me know if adjustment of page size is required. |