完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
错误提示如图所示,主芯片是STM32h743vgt,工具keil5,烧写方式SWD。 另外,CubeMX的debug mode配置如下: 附上初始化代码: / MPU Configuration--------------------------------------------------------/MPU_Config();/ Enable I-Cache---------------------------------------------------------/SCB_EnableICache(); / Enable D-Cache---------------------------------------------------------/SCB_EnableDCache(); / MCU Configuration--------------------------------------------------------/ / Reset of all peripherals, Initializes the Flash interface and the Systick. /HAL_Init(); / USER CODE BEGIN Init / / USER CODE END Init / / Configure the system clock /SystemClock_Config(); 时钟配置(外部25MHz晶振): void SystemClock_Config(void){RCC_OscInitTypeDef RCC_OscInitStruct = {0};RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; /* Supply configuration update enable/HAL_PWREx_ConfigSupply(PWR_EXTERNAL_SOURCE_SUPPLY); /* Configure the main internal regulator output voltage/__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {} /** Initializes the RCC Oscillators according to the specified parameters
if (HAL_RCC_ClockConfig( RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK){Error_Handler();}} MPU配置: void MPU_Config(void){MPU_Region_InitTypeDef MPU_InitStruct = {0}; / Disables the MPU /HAL_MPU_Disable(); /* Initializes and configures the Region and the memory to be protected/MPU_InitStruct.Enable = MPU_REGION_ENABLE;MPU_InitStruct.Number = MPU_REGION_NUMBER0;MPU_InitStruct.BaseAddress = 0x30040000;MPU_InitStruct.Size = MPU_REGION_SIZE_256B;MPU_InitStruct.SubRegionDisable = 0x0;MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0;MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_ENABLE;MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE;MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE;MPU_InitStruct.IsBufferable = MPU_ACCESS_BUFFERABLE; HAL_MPU_ConfigRegion( MPU_InitStruct); /* Initializes and configures the Region and the memory to be protected/MPU_InitStruct.Number = MPU_REGION_NUMBER1;MPU_InitStruct.BaseAddress = 0x30024000;//MPU_InitStruct.BaseAddress = 0x30044000;MPU_InitStruct.Size = MPU_REGION_SIZE_64KB;//MPU_InitStruct.Size = MPU_REGION_SIZE_16KB;MPU_InitStruct.IsCacheable = MPU_ACCESS_CACHEABLE;MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE; HAL_MPU_ConfigRegion( MPU_InitStruct);/ Enables the MPU /HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT); } |
|
相关推荐
1个回答
|
|
在SYS选项里勾选SW,且SW不得启用第二功能PIN,否则就不能SW下载了。
|
|
|
|
只有小组成员才能发言,加入小组>>
调试STM32H750的FMC总线读写PSRAM遇到的问题求解?
1820 浏览 1 评论
X-NUCLEO-IHM08M1板文档中输出电流为15Arms,15Arms是怎么得出来的呢?
1634 浏览 1 评论
1104 浏览 2 评论
STM32F030F4 HSI时钟温度测试过不去是怎么回事?
740 浏览 2 评论
ST25R3916能否对ISO15693的标签芯片进行分区域写密码?
1692 浏览 2 评论
1951浏览 9评论
STM32仿真器是选择ST-LINK还是选择J-LINK?各有什么优势啊?
756浏览 4评论
STM32F0_TIM2输出pwm2后OLED变暗或者系统重启是怎么回事?
587浏览 3评论
605浏览 3评论
stm32cubemx生成mdk-arm v4项目文件无法打开是什么原因导致的?
570浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-31 02:16 , Processed in 0.690749 second(s), Total 49, Slave 43 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号