Skip to content

Conversation

JhanBoChao-Realtek
Copy link
Contributor

The rts5912's port 80 has a FIFO. In the ISR (Interrupt Service Routine), extract the FIFO data until the FIFO is empty, otherwise port 80 data will be lost.

Copy link

espi_send_callbacks(&espi_data->callbacks, dev, evt);
int32_t start_time = k_uptime_get_32();

while (!(port80_reg->STS & PORT80_STS_FIFOEM)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As implemented, you are including the time spent in the callback as part of the timeout check. If the callback is slow, this will cause a false timeout. You should exclude the callback time in this calculation.

Also note that it's recommended to use the 64-bit version of k_uptime_get()

The rts5912's port 80 has a FIFO. In the ISR (Interrupt Service Routine),
extract the FIFO data until the FIFO is empty, otherwise port 80 data will
be lost.

Signed-off-by: jhan bo chao <[email protected]>
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants