-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Flexio SPI loopback test failed on fast speed(16Mbps) #88877
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
base: main
Are you sure you want to change the base?
Flexio SPI loopback test failed on fast speed(16Mbps) #88877
Conversation
f852952
to
17d6aa5
Compare
17d6aa5
to
15439f7
Compare
79f39f0
to
457bbe3
Compare
Hello @Raymond0225, I tested the changes you proposed on my target device, and they seem to be working for me now. 😊 That said, I wanted to highlight a performance concern. It appears the issue stems from the busy wait condition inside the ISR. As seen in this line, there's a 100-microsecond wait, which seems to negatively impact performance. When I reduced the delay to just 1 or 2 cycles, I noticed a significant performance improvement. It might be worth considering removing or minimizing such waits in the ISR to keep its execution time as short as possible. @mmahadevan108, what are your thoughts on this? |
thanks @asingh-GiN for your feedback. |
Did a lot of tests just now, I am sure we can remove that delay completely. But so far, we can't, if we remove that delay, loop_spi test fails. There are bugs and I will submit another PR to address this issue and fix it. |
@Raymond0225 Thanks for checking it out as well. :) |
457bbe3
to
505f980
Compare
505f980
to
6329f07
Compare
6329f07
to
78ecaf2
Compare
78ecaf2
to
69bb782
Compare
69bb782
to
e401ad2
Compare
Several reason cause loopback test failed: a) FlexIO input frequency is not correct, on RT11xx, input freq is 24M, while max bandrate can reach 1/4 of input freq, so it can only support 6Mbps. b) Flexio shift register depend on correct timer output to triggger TX and TX, if timer comparison value is not accurate, RX error happens on high band rate. This is the reason why test fails on RT1060. also fix a error on FlexIO clock ID calculation. Signed-off-by: Raymond Lei <raymond.lei@nxp.com>
Add overlay file for RT1170 EVK and simply existing flexio spi overlay file for RT1060 EVKC and RT1064 EVK. One flexio-spi interface for both slow and fast tests. Fast bandrate set to 16Mbps now. Signed-off-by: Raymond Lei <raymond.lei@nxp.com>
e401ad2
to
6e3c6dc
Compare
|
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.
baud rate
to be corrected in commits messages.
test: drivers: spi_loopback: Flexio spi support for RT1060 EVKC and RT1170 EVK
fix this issue: #77992