| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #include "hpm_dma_drv.h"
- #include "board.h"
- #include "hard_system.h"
- #include "hpm_ppor_drv.h"
- #include "test.h"
- #define U3_DMA HPM_HDMA // 关的是串口三的接收dma 这里没有空闲中断 不使用dma模式接收
- #define U3_DMA_CH 1
- void sys_reset(void)
- {
- /*Enable software reset*/
- ppor_reset_mask_set_source_enable(HPM_PPOR, ppor_reset_software);
- /* software reset*/
- printf("%s\n", __func__);
- ppor_sw_reset(HPM_PPOR, 10);
- }
- /**
- * @brief 禁用指定DMA通道
- * @note HPM6750的DMA1 Stream1对应:
- * - DMA控制器:DMA0(HPM6750主DMA控制器)
- *
- */
- void u3_dma_disable(void)
- {
- // 禁用HDMA通道 1 根据实际修改
- // dma_disable_channel(U3_DMA, U3_DMA_CH);
-
- }
- #ifdef SYSTEM_TEST
- /*
- reset demo test 20260115 pass
- */
- void system_test(void)
- {
- sys_reset();
- /*If a software reset occurs, clear the reset flag and print the message*/
- if (ppor_reset_get_flags(HPM_PPOR) & ppor_reset_software) {
- ppor_reset_clear_flags(HPM_PPOR, ppor_reset_software);
- ppor_reset_mask_clear_source_enable(HPM_PPOR, ppor_reset_software);
- printf("Software reset has occurred\n");
- while (1) {
- };
- }
- #endif
|