From c5cc930fea45f1c004e5b9d8466c8c2ff5173858 Mon Sep 17 00:00:00 2001 From: Lizongdi <1210855344@qq.com> Date: Tue, 21 Jul 2026 17:09:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=86=85=E5=AD=98?= =?UTF-8?q?=E6=B1=A0=E7=9B=B4=E6=8E=A5=E5=AE=9A=E4=B9=89=E5=88=B0RAM?= =?UTF-8?q?=E4=B8=8A=EF=BC=8C=E8=BF=99=E6=A0=B7=E5=8F=AF=E4=BB=A5=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E8=A2=ABDMA=E8=AE=BF=E9=97=AE=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bspMCU/My_print.c | 7 +------ library/common/rd_mempool.c | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/bspMCU/My_print.c b/bspMCU/My_print.c index bf830b4..40692cd 100644 --- a/bspMCU/My_print.c +++ b/bspMCU/My_print.c @@ -30,18 +30,13 @@ volatile uint8_t g_flow_control_paused = 0; TComCtrl *g_ptUartCtrl; -__attribute__((section(".dma_buffer"), aligned(32))) -static uint8_t uart_tx_buffer[512]; - int USART_Send(char *_pBuffer, uint32_t _iSize) { HAL_GPIO_WritePin(RS485_2_DIR_GPIO_Port, RS485_2_DIR_Pin,GPIO_PIN_SET); TUartUserData *ptUartUserData = (TUartUserData *)g_ptUartCtrl->m_pUserData; // int iRet = HAL_UART_Transmit(ptUartUserData->m_uart, (uint8_t *)_pBuffer, _iSize, 100); // HAL_GPIO_WritePin(RS485_2_DIR_GPIO_Port, RS485_2_DIR_Pin,GPIO_PIN_RESET); - RD_MEMCPY(uart_tx_buffer, _pBuffer, _iSize); - //SCB_CleanDCache_by_Addr((uint32_t*)uart_tx_buffer, _iSize); - int iRet = HAL_UART_Transmit_DMA(ptUartUserData->m_uart, (uint8_t *)uart_tx_buffer, _iSize); + int iRet = HAL_UART_Transmit_DMA(ptUartUserData->m_uart, (uint8_t *)_pBuffer, _iSize); return iRet; } diff --git a/library/common/rd_mempool.c b/library/common/rd_mempool.c index 50db0ee..95b1270 100644 --- a/library/common/rd_mempool.c +++ b/library/common/rd_mempool.c @@ -197,7 +197,7 @@ WEAK void Rd_MemDoInit(void) g_pool_start = g_heap_buf; #else // 静态数组,确保对齐 - static uint8_t static_pool[MEM_POOL_TOTAL_SIZE] __attribute__((aligned(RD_ALIGN_SIZE))); + static uint8_t static_pool[MEM_POOL_TOTAL_SIZE] __attribute__((section(".dma_buffer"), aligned(RD_ALIGN_SIZE))); g_pool_start = static_pool; #endif