Skip to content
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

UART failure with CONFIG_UART_ASYNC_API and DMA #32832

Closed
wants to merge 3 commits into from

Conversation

FRASTM
Copy link
Collaborator

@FRASTM FRASTM commented Mar 3, 2021

when enabling the DMA of the stm32f7 soc, especially on the tests/drivers/uart/uart_async_api,
the cache DMA is not coherent.
--> Same approach than the #27911
This PR is to help for fixing of the #31711
This still give an error on the test_chained_write test case

Signed-off-by: Francois Ramu [email protected]

@FRASTM FRASTM added platform: STM32 ST Micro STM32 DNM This PR should not be merged (Do Not Merge) labels Mar 3, 2021
@github-actions github-actions bot added the area: Tests Issues related to a particular existing or missing test label Mar 3, 2021
@FRASTM FRASTM added area: UART Universal Asynchronous Receiver-Transmitter area: Tests Issues related to a particular existing or missing test and removed area: Tests Issues related to a particular existing or missing test labels Mar 3, 2021
@zephyrbot zephyrbot requested a review from dcpleung March 3, 2021 22:57
Copy link
Member

@dcpleung dcpleung left a comment

Choose a reason for hiding this comment

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

There are couple commented out code block which needs to be removed.

drivers/serial/Kconfig.stm32 Outdated Show resolved Hide resolved
Comment on lines 671 to 677
/*
if (data->dma_rx.buffer != event.data.rx.buf) {
memcpy(event.data.rx.buf,
data->dma_rx.dma_aligned_buffer,
data->dma_rx_buffer_len);
}
*/
Copy link
Member

Choose a reason for hiding this comment

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

Please remove commented out code blocks.

Comment on lines 1037 to 1051
/*
if (addr_diff == 0 && buf_size >= __SCB_DCACHE_LINE_SIZE) {
buf_size = UART_STM32_ROUND_DOWN(buf_size);
} else {
if (addr_diff != 0) {
buf_size = MIN(buf_size, addr_diff);
}

buf_size = MIN(buf_size, __SCB_DCACHE_LINE_SIZE);

memcpy(data->dma_tx.dma_aligned_buffer,
data->dma_tx.buffer, buf_size);
tx_data = data->dma_tx.dma_aligned_buffer;
}
*/
Copy link
Member

Choose a reason for hiding this comment

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

Remove commented out code block

Comment on lines 1113 to 1124
/*
if (addr_diff == 0 && buf_size >= __SCB_DCACHE_LINE_SIZE) {
buf_size = UART_STM32_ROUND_DOWN(buf_size);
} else {
if (addr_diff != 0) {
buf_size = MIN(buf_size, addr_diff);
}

buf_size = MIN(buf_size, __SCB_DCACHE_LINE_SIZE);
rx_buf = data->dma_rx.dma_aligned_buffer;
}
*/
Copy link
Member

Choose a reason for hiding this comment

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

Remove commented out code block

@github-actions
Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label May 10, 2021
This sets the dts of dma for using the uart 6 asynch api.
The stm32f746 has a dma V1 with request 5 for Tx/Rx usart6
The Tx&Rx pins (PG14, PG9) of the usart6 are connected
on the nucleo_f746zg board to pass the test

Signed-off-by: Francois Ramu <[email protected]>
This sets the dts of dma for using the uart 6 asynch api
The stm32f767 has a dma V1 with request 5 for Tx/Rx usart6
The Tx&Rx pins (PG14, PG9) of the usart6 are connected
on the nucleo_f767zi board to pass the test

Signed-off-by: Francois Ramu <[email protected]>
Remove the cache configuration from the stm32f7 soc,
as the core/aarch32/cortex_m inhibits it.

Signed-off-by: Francois Ramu <[email protected]>
@FRASTM FRASTM removed DNM This PR should not be merged (Do Not Merge) Stale labels May 20, 2021
@FRASTM
Copy link
Collaborator Author

FRASTM commented May 20, 2021

initial issue is now closed

@FRASTM FRASTM closed this May 20, 2021
@FRASTM FRASTM deleted the issue31711 branch May 20, 2021 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Tests Issues related to a particular existing or missing test area: UART Universal Asynchronous Receiver-Transmitter platform: STM32 ST Micro STM32
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants