/** ****************************************************************** * @file main.c * @author fire * @version V1.0 * @date 2019-xx-xx * @brief DMA—直接存储访问 ****************************************************************** * @attention * * 实验平台:野火 STM32H750 开发板 * 论坛 :http://www.firebbs.cn * 淘宝 :http://firestm32.taobao.com * ****************************************************************** */ #include "stm32h7xx.h" #include "main.h" #include "./led/bsp_led.h" #include "./delay/core_delay.h" #include "./mpu/bsp_mpu.h" #include "./usart/bsp_usart_dma.h" extern DMA_HandleTypeDef DMA_Handle; uint8_t SendBuff[SENDBUFF_SIZE] __attribute__((at(0x30000000))); /** * @brief 主函数 * @param 无 * @retval 无 */ int main(void) { uint16_t i; /* 系统时钟初始化成480MHz */ SystemClock_Config(); /* 默认不配置 MPU,若需要更高性能,当配置 MPU 后,使用 DMA 时需注意 Cache 与 内存内容一致性的问题, 具体注意事项请参考配套教程的 MPU 配置相关章节 */ // Board_MPU_Config(0, MPU_Normal_WT, 0xD0000000, MPU_32MB); // Board_MPU_Config(1, MPU_Normal_WT, 0x24000000, MPU_512KB); SCB_EnableICache(); // 使能指令 Cache // SCB_EnableDCache(); // 使能数据 Cache /* LED 端口初始化 */ LED_GPIO_Config(); /* 串口初始化 */ DEBUG_USART_Config(); /* DMA 初始化 */ USART_DMA_Config(); printf("\r\n USART1 DMA TX 测试 \r\n"); /*填充将要发送的数据*/ for(i=0;i