本帖最后由 abner_ma 于 2024-9-18 22:54 编辑
STM32H7R7/S7系列定位在于性价比高,是一款基于bootflash的MCU,具有Cortex®-M7内核,运行频率高达600 MHz,拥有64 KB用户bootflash、可灵活配置的620 KB SRAM以及带Flex ECC的32 x 32 KB缓存。STM32H7R7/S7系列支持高速外部存储器接口和XiP,提供5种不同封装,以在极低成本下实现出色性能。专用图形系列可利用NeoChrom GPU、JPEG编解码器和LTDC实现类似MPU的GUI,最大程度减少CPU的介入。
1 )外部存储器容量不受限制FMC(NAND、NOR、SDRAM的并行接口)、2个200MHz DTR(1-16位,支持双边沿)串行xSPI接口以及用于连接任何类型存储器的eMMC.
2 )64 KB bootflash(用户Flash)和可灵活配置的620 KB SRAM(包括TCM),用于实时应用中所需的零等待访问
3 )600 MHz bootflash MCU(3174 CoreMark和1284 DMIPS)
4 )从内部和外部存储器实时执行
5) 2个USB-FS/HS,具有USB Type-C®供电 (UCPD) 功能和I3C
6 )集成式电源管理 (PMIC)
7 )NeoChrom GPU对2D和2.5D GUI进行加速,JPEG编解码器用于MJPEG视频的流畅播放
8 ) 内存/GPU/显示器之间的智能DMA架构将CPU负载限制在5-10%
9 ) 可在高清分辨下运行
keil IDE支持还不太完善,上STM32CubeIDE 1.16.0+cubeMX联合开发。
4
配置好时钟,就打通任督二脉
轻松点个灯玩玩
#include "main.h"
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* Enable the CPU Cache */
/* Enable I-Cache---------------------------------------------------------*/
SCB_EnableICache();
/* Enable D-Cache---------------------------------------------------------*/
SCB_EnableDCache();
/* MCU Configuration--------------------------------------------------------*/
/* Update SystemCoreClock variable according to RCC registers values. */
SystemCoreClockUpdate();
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
HAL_GPIO_TogglePin(GPIOM, LD4_Pin|LD3_Pin);
HAL_GPIO_TogglePin(GPIOO, LD1_Pin|LD2_Pin);
HAL_Delay(1000);
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
/**
* [url=home.php?mod=space&uid=247401]@brief[/url] GPIO Initialization Function
* @param None
* @retval None
*/
static void MX_GPIO_Init(void)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
/* USER CODE BEGIN MX_GPIO_Init_1 */
/* USER CODE END MX_GPIO_Init_1 */
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOM_CLK_ENABLE();
__HAL_RCC_GPIOO_CLK_ENABLE();
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOM, LD4_Pin|LD3_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOO, LD1_Pin|LD2_Pin, GPIO_PIN_RESET);
/*Configure GPIO pins : LD4_Pin LD3_Pin */
GPIO_InitStruct.Pin = LD4_Pin|LD3_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOM, &GPIO_InitStruct);
/*Configure GPIO pins : LD1_Pin LD2_Pin */
GPIO_InitStruct.Pin = LD1_Pin|LD2_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOO, &GPIO_InitStruct);
/* USER CODE BEGIN MX_GPIO_Init_2 */
/* USER CODE END MX_GPIO_Init_2 */
}
/* USER CODE BEGIN 4 */
/* USER CODE END 4 */
/**
* [url=home.php?mod=space&uid=247401]@brief[/url] This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1)
{
}
/* USER CODE END Error_Handler_Debug */
}
#ifdef USE_FULL_ASSERT
/**
* [url=home.php?mod=space&uid=247401]@brief[/url] Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t *file, uint32_t line)
{
/* USER CODE BEGIN 6 */
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* USER CODE END 6 */
}
#endif /* USE_FULL_ASSERT */
|