实验1-实验目的:通过DMA把buffer的数据搬运到buffer2当中。
//declare a buffer to store the data
uint32_t buffer[3] = {1,2,3};
//declare a buffer to store the data
uint32_t buffer2[3] = {0,0,0};

DMA:是个搬运数据的小助手。

相关设置:

main函数中搬运数据:
HAL_DMA_Start(&hdma_memtomem_dma1_channel1, (uint32_t)buffer, (uint32_t)buffer2, 10);
so easy! one line code~
观察结果:
首先把buffer buffer2 右键加入watch:

最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



