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

Xinliu0260 patch 1 #9755

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions bsp/stm32/libraries/HAL_Drivers/drivers/drv_usart_v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,10 @@ static rt_ssize_t stm32_transmit(struct rt_serial_device *serial,

if (uart->uart_dma_flag & RT_DEVICE_FLAG_DMA_TX)
{
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
struct rt_serial_tx_fifo *tx_fifo = (struct rt_serial_tx_fifo *) serial->serial_tx;
SCB_CleanDCache_by_Addr((uint32_t *)tx_fifo->rb.buffer_ptr, tx_fifo->rb.buffer_size);
#endif
HAL_UART_Transmit_DMA(&uart->handle, buf, size);
return size;
}
Expand Down
4 changes: 2 additions & 2 deletions components/drivers/include/drivers/dev_serial_v2.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ struct rt_serial_rx_fifo
rt_uint16_t rx_cpt_index;

/* software fifo */
rt_uint8_t buffer[];
rt_align(32) rt_uint8_t buffer[];
};

/**
Expand All @@ -271,7 +271,7 @@ struct rt_serial_tx_fifo
struct rt_completion tx_cpt;

/* software fifo */
rt_uint8_t buffer[];
rt_align(32) rt_uint8_t buffer[];
};

/**
Expand Down
Loading