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