您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ CPU_CACHE_Enable函数代码示例

51自学网 2021-06-01 20:05:07
  C++
这篇教程C++ CPU_CACHE_Enable函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中CPU_CACHE_Enable函数的典型用法代码示例。如果您正苦于以下问题:C++ CPU_CACHE_Enable函数的具体用法?C++ CPU_CACHE_Enable怎么用?C++ CPU_CACHE_Enable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了CPU_CACHE_Enable函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: main

/**  * @brief   Main program  * @param  None  * @retval None  */int main(void){	/* Enable the CPU Cache */	CPU_CACHE_Enable();	/* STM32F7xx HAL library initialization */	HAL_Init();	/* Configure the system clock to 216 MHz */	SystemClock_Config();	/* Configure LCD : Only one layer is used */	LCD_Config();	/* Our main starts here */	uint16_t ypos = 0, ymax = 0;	int8_t yincr = 1;	BSP_LCD_SetTextColor(LCD_COLOR_WHITE);	BSP_LCD_SetBackColor(LCD_COLOR_BLACK);	while(1) {	  if(ypos == 0) {		  yincr = 1;		  ymax = BSP_LCD_GetYSize();	  } else {		  yincr = -1;		  ymax = 0;	  }	  for(;yincr == 1 ? ypos < BSP_LCD_GetYSize() - Font24.Height : ypos > 0; ypos+=yincr) {		  BSP_LCD_DisplayStringAt(0, ypos, (uint8_t*)"Hello to everyone!", CENTER_MODE);	  }	}}
开发者ID:Analias,项目名称:stm32-discof7,代码行数:39,


示例2: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* This project template calls firstly two functions in order to configure MPU feature      and to enable the CPU Cache, respectively MPU_Config() and CPU_CACHE_Enable().     These functions are provided as template implementation that User may integrate      in his application, to enhance the performance in case of use of AXI interface      with several masters. */     /* Configure the MPU attributes as Write Through */  MPU_Config();  /* Enable the CPU Cache */  CPU_CACHE_Enable();  /* STM32F7xx HAL library initialization:       - Configure the Flash ART accelerator on ITCM interface       - Configure the Systick to generate an interrupt each 1 msec       - Set NVIC Group Priority to 4       - Low Level Initialization     */  HAL_Init();  /* Configure the System clock to have a frequency of 216 MHz */  SystemClock_Config();  /* Add your application code here     */  /* Infinite loop */  while (1)  {  }}
开发者ID:RadMie,项目名称:STM32F7DiscoveryBase,代码行数:40,


示例3: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* Enable the CPU Cache */  CPU_CACHE_Enable();  /* STM32F7xx HAL library initialization:       - Configure the Flash ART accelerator on ITCM interface       - Configure the Systick to generate an interrupt each 1 msec       - Set NVIC Group Priority to 4       - Global MSP (MCU Support Package) initialization     */  HAL_Init();    /* Configure the system clock to 200 MHz */  SystemClock_Config();    /* Init task */  osThreadDef(Start, StartThread, osPriorityBelowNormal, 0, configMINIMAL_STACK_SIZE *2);  osThreadCreate (osThread(Start), NULL);    /* Start the scheduler */  osKernelStart();    /* We should never get here as control is now taken by the scheduler */  for( ;; );}
开发者ID:acrepina,项目名称:STM32F7_serverWEB,代码行数:31,


示例4: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* Enable the CPU Cache */  CPU_CACHE_Enable();	  /* STM32F7xx HAL library initialization:       - Configure the Flash ART accelerator on ITCM interface       - Systick timer is configured by default as source of time base, but user          can eventually implement his proper time base source (a general purpose          timer for example or other time source), keeping in mind that Time base          duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and          handled in milliseconds basis.       - Set NVIC Group Priority to 4       - Low Level Initialization     */  if (HAL_Init() != HAL_OK)  {    Error_Handler();  }  /* Configure the system clock to 216 MHz */  SystemClock_Config();  /* -1- Initialize LEDs mounted on STM32756G-EVAL board */  BSP_LED_Init(LED1);  /* -2- Configure EXTI15_10 (connected to PC.13 pin) in interrupt mode */  EXTI15_10_IRQHandler_Config();  /* Infinite loop */  while (1)  {  }}
开发者ID:MrZANE42,项目名称:verisure1512,代码行数:39,


示例5: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* Enable the CPU Cache */  CPU_CACHE_Enable();    /* STM32F7xx HAL library initialization:       - Configure the Flash ART accelerator on ITCM interface       - Configure the Systick to generate an interrupt each 1 msec       - Set NVIC Group Priority to 4       - Low Level Initialization     */  HAL_Init();    /* Configure the System clock to have a frequency of 200 Mhz */  SystemClock_Config();    /* Initialize IO expander */  BSP_IO_Init();    /* Start task */  osThreadDef(USER_Thread, StartThread, osPriorityNormal, 0, 8 * configMINIMAL_STACK_SIZE);  osThreadCreate(osThread(USER_Thread), NULL);    /* Create Application Queue */  osMessageQDef(osqueue, 1, uint16_t);  AppliEvent = osMessageCreate(osMessageQ(osqueue), NULL);    /* Start scheduler */  osKernelStart();    /* We should never get here as control is now taken by the scheduler */  for( ;; );}
开发者ID:MrZANE42,项目名称:verisure1512,代码行数:38,


示例6: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* Enable the CPU Cache */  CPU_CACHE_Enable();  /* STM32F7xx HAL library initialization:       - Configure the Flash ART accelerator on ITCM interface       - Configure the Systick to generate an interrupt each 1 msec       - Set NVIC Group Priority to 4       - Low Level Initialization     */  HAL_Init();      /* Configure the system clock to 216 Mhz */  SystemClock_Config();    /* Initialize LEDs */  BSP_LED_Init(LED1);    /* Thread 1 definition */  osThreadDef(LED1, LED_Thread1, osPriorityNormal, 0, configMINIMAL_STACK_SIZE);    /* Start thread 1 */  LED1_ThreadId = osThreadCreate(osThread(LED1), NULL);    /* Start scheduler */  osKernelStart();    /* We should never get here as control is now taken by the scheduler */  for(;;);}
开发者ID:acrepina,项目名称:STM32F7_serverWEB,代码行数:36,


示例7: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  uint32_t  i;  uint32_t  *ptrLcd;   /* Enable the CPU Cache */  CPU_CACHE_Enable();	  /* STM32F7xx HAL library initialization:       - Configure the Flash ART accelerator on ITCM interface       - Systick timer is configured by default as source of time base, but user          can eventually implement his proper time base source (a general purpose          timer for example or other time source), keeping in mind that Time base          duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and          handled in milliseconds basis.       - Set NVIC Group Priority to 4       - Low Level Initialization     */  HAL_Init();  /* Configure the system clock to 200 MHz */  SystemClock_Config();    /*##-1- Initialise the LCD #################################################*/  BSP_LCD_Init();  /* Init LCD screen buffer */  ptrLcd = (uint32_t*)(LCD_FRAME_BUFFER);  for (i=0; i<(BSP_LCD_GetXSize()*BSP_LCD_GetYSize()); i++)  {    ptrLcd[i]=0;  }  BSP_LCD_LayerDefaultInit(1, LCD_FRAME_BUFFER);  /* Enable the LCD */  BSP_LCD_DisplayOn();  /* Select the LCD Foreground layer */  BSP_LCD_SelectLayer(1);  /* Set active window */  BSP_LCD_SetLayerWindow(1, xoffset, yoffset, xsize, ysize);    /*##-2- Camera Initialisation and start capture ############################*/  /* Initialize the Camera */  BSP_CAMERA_Init(resolution);  /* Wait 1s before Camera snapshot */  HAL_Delay(1000);  /* Start the Camera Capture */  BSP_CAMERA_SnapshotStart((uint8_t *)CAMERA_FRAME_BUFFER);  while (1)  {  }}
开发者ID:RadMie,项目名称:STM32F7DiscoveryBase,代码行数:63,


示例8: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){    /* Configure the MPU attributes as Write Through */    MPU_Config();    /* Enable the CPU Cache */    CPU_CACHE_Enable();    /* STM32F7xx HAL library initialization:         - Configure the Flash ART accelerator on ITCM interface         - Systick timer is configured by default as source of time base, but user           can eventually implement his proper time base source (a general purpose           timer for example or other time source), keeping in mind that Time base           duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and           handled in milliseconds basis.         - Set NVIC Group Priority to 4         - Low Level Initialization       */    HAL_Init();    /* Configure LED1 and LED3 */    BSP_LED_Init(LED1);    BSP_LED_Init(LED3);    /* Configure the system clock to 200 MHz */    /* This function will be executed from SDRAM */    SystemClock_Config();    /*##-1- Fill the buffer in the SDRAM device ##########################################*/    Fill_Buffer(aTable, 1024, 0);    /*##-2- Read address of the buffer and stack pointer address ########################*/    uwTabAddr = (uint32_t)aTable; /* should be above 0x60000000 */    /* Get main stack pointer value */    MSPValue = __get_MSP(); /* should be above 0x60000000 */    /*##-3- Activate LEDs pending on read values ########################################*/    if ((uwTabAddr >= SDRAM_ADDRESS) && (MSPValue >= SDRAM_ADDRESS))    {        BSP_LED_On(LED1);    }    else    {   /* Toggle LED3 in an infinite loop */        while (1)        {            BSP_LED_Toggle(LED3);            /* Insert delay 100 ms */            HAL_Delay(100);        }    }    /* Infinite loop */    while (1)    {    }}
开发者ID:MrZANE42,项目名称:verisure1512,代码行数:62,


示例9: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* Enable the CPU Cache */  CPU_CACHE_Enable();    /* STM32F7xx HAL library initialization:       - Configure the Flash ART accelerator       - Systick timer is configured by default as source of time base, but user          can eventually implement his proper time base source (a general purpose          timer for example or other time source), keeping in mind that Time base          duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and          handled in milliseconds basis.       - Set NVIC Group Priority to 4       - Low Level Initialization     */  HAL_Init();  /* Configure the system clock to 216 MHz */  SystemClock_Config();  /* Initialize BSP Led for N/A */  BSP_LED_Init(LED1);  /*##-1- Configure the UART peripheral ######################################*/  /* Put the USART peripheral in the Asynchronous mode (UART Mode) */  /* UART configured as follows:      - Word Length = 8 Bits (7 data bit + 1 parity bit) : 	                  BE CAREFUL : Program 7 data bits + 1 parity bit in PC HyperTerminal      - Stop Bit    = One Stop bit      - Parity      = ODD parity      - BaudRate    = 9600 baud      - Hardware flow control disabled (RTS and CTS signals) */  UartHandle.Instance        = USARTx;  UartHandle.Init.BaudRate   = 9600;  UartHandle.Init.WordLength = UART_WORDLENGTH_8B;  UartHandle.Init.StopBits   = UART_STOPBITS_1;  UartHandle.Init.Parity     = UART_PARITY_ODD;  UartHandle.Init.HwFlowCtl  = UART_HWCONTROL_NONE;  UartHandle.Init.Mode       = UART_MODE_TX_RX;  UartHandle.Init.OverSampling = UART_OVERSAMPLING_16;  if (HAL_UART_Init(&UartHandle) != HAL_OK)  {    /* Initialization Error */    Error_Handler();  }  /* Output a message on Hyperterminal using printf function */  printf("/n/r UART Printf Example: retarget the C library printf function to the UART/n/r");//  printf("** Test finished successfully. ** /n/r");sprintf  /* Infinite loop */  while (1)  {  }}
开发者ID:smithcts,项目名称:STM32F7_Discovery,代码行数:62,


示例10: main

/**  * @brief  Main program.  * @param  None  * @retval None  */int main(void){  /* Enable the CPU Cache */  CPU_CACHE_Enable();	  /* STM32F7xx HAL library initialization:       - Configure the Flash ART accelerator on ITCM interface       - Systick timer is configured by default as source of time base, but user          can eventually implement his proper time base source (a general purpose          timer for example or other time source), keeping in mind that Time base          duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and          handled in milliseconds basis.       - Set NVIC Group Priority to 4       - Low Level Initialization     */  HAL_Init();  /* Configure the system clock to 216 MHz */  SystemClock_Config();  /* Configure LED1 and LED3 */  BSP_LED_Init(LED1);  BSP_LED_Init(LED3);    /*##-1- Configure ADC1, ADC2 and ADC3 peripherals ################################*/  ADC_Config();  /*##-2- Enable ADC3 ########################################################*/  if(HAL_ADC_Start(&AdcHandle3) != HAL_OK)  {    /* Start Error */    Error_Handler();  }  /*##-3- Enable ADC2 ########################################################*/  if (HAL_ADC_Start(&AdcHandle2) != HAL_OK)  {    /* Start Error */    Error_Handler();  }  /*##-4- Start ADC1 and ADC2 multimode conversion process and enable DMA ####*/  if (HAL_ADCEx_MultiModeStart_DMA(&AdcHandle1, (uint32_t *)aADCTripleConvertedValue, 3) != HAL_OK)  {    /* Start Error */    Error_Handler();  }  /* Infinite loop */  while (1)  {  }}
开发者ID:MrZANE42,项目名称:verisure1512,代码行数:58,


示例11: main

int main (void) {  MPU_Config();                             /* Configure the MPU              */  CPU_CACHE_Enable();                       /* Enable the CPU Cache           */  HAL_Init();                               /* Initialize the HAL Library     */  BSP_SDRAM_Init();                         /* Initialize BSP SDRAM           */  SystemClock_Config();                     /* Configure the System Clock     */  init_filesystem();                        /* Inital rl-flash Librart        */  MainTask();  for (;;);}
开发者ID:jackeyjiang,项目名称:meizi_f7disc,代码行数:12,


示例12: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* Enable the CPU Cache */  CPU_CACHE_Enable();    /* STM32F7xx HAL library initialization:       - Configure the Flash ART accelerator on ITCM interface       - Configure the Systick to generate an interrupt each 1 msec       - Set NVIC Group Priority to 4       - Low Level Initialization     */  HAL_Init();    /* Configure the System clock to have a frequency of 216 MHz */  SystemClock_Config();      /* Configure Key Button */  BSP_PB_Init(BUTTON_KEY, BUTTON_MODE_GPIO);    /* Check if the KEY Button is pressed */  if(BSP_PB_GetState(BUTTON_KEY) == 0x00)  {    /* Test if user code is programmed starting from USBD_DFU_APP_DEFAULT_ADD address */    if(((*(__IO uint32_t*)USBD_DFU_APP_DEFAULT_ADD) & 0x2FFE0000 ) == 0x20000000)    {      /* Jump to user application */      JumpAddress = *(__IO uint32_t*) (USBD_DFU_APP_DEFAULT_ADD + 4);      JumpToApplication = (pFunction) JumpAddress;            /* Initialize user application's Stack Pointer */      __set_MSP(*(__IO uint32_t*) USBD_DFU_APP_DEFAULT_ADD);      JumpToApplication();    }  }    /* Otherwise enters DFU mode to allow user programming his application */  /* Init Device Library */  USBD_Init(&USBD_Device, &DFU_Desc, 0);    /* Add Supported Class */  USBD_RegisterClass(&USBD_Device, USBD_DFU_CLASS);    /* Add DFU Media interface */  USBD_DFU_RegisterMedia(&USBD_Device, &USBD_DFU_Flash_fops);  /* Start Device Process */  USBD_Start(&USBD_Device);    /* Run Application (Interrupt mode) */  while (1)  {  }}
开发者ID:MrZANE42,项目名称:verisure1512,代码行数:58,


示例13: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* Configure the MPU attributes as Write Through */  MPU_Config();  /* Enable the CPU Cache */  CPU_CACHE_Enable();  /* STM32F7xx HAL library initialization:       - Configure the Flash prefetch       - Systick timer is configured by default as source of time base, but user          can eventually implement his proper time base source (a general purpose          timer for example or other time source), keeping in mind that Time base          duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and          handled in milliseconds basis.       - Set NVIC Group Priority to 4       - Low Level Initialization     */  HAL_Init();  /* Configure the system clock to 216 MHz */  SystemClock_Config();  /* Initialize LED */  BSP_LED_Init(LED1);  /* Set to 1 if an transfer error is detected */  transferErrorDetected = 0;  transferCompleteDetected = 0;  /* Configure and enable the DMA stream for Memory to Memory transfer */  DMA_Config();  /* Infinite loop */  while (1)  {    if (transferErrorDetected == 1)    {      /* Toggle LED1 with a period of 200 ms */      BSP_LED_Toggle(LED1);      HAL_Delay(200);      transferErrorDetected = 0;    }    if (transferCompleteDetected == 1)    {      /* Turn LED1 on*/      BSP_LED_On(LED1);      transferCompleteDetected = 0;    }   }}
开发者ID:acrepina,项目名称:STM32F7_serverWEB,代码行数:56,


示例14: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* Enable the CPU Cache */  CPU_CACHE_Enable();	  /* STM32F7xx HAL library initialization:       - Configure the Flash ART accelerator on ITCM interface       - Systick timer is configured by default as source of time base, but user          can eventually implement his proper time base source (a general purpose          timer for example or other time source), keeping in mind that Time base          duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and          handled in milliseconds basis.       - Set NVIC Group Priority to 4       - Low Level Initialization     */  HAL_Init();  /* Initialize Tamper push-button, will be used to trigger an interrupt each time it's pressed.       In the ISR the PLL source will be changed from HSI to HSE circularly */  BSP_PB_Init(BUTTON_TAMPER, BUTTON_MODE_EXTI);  /* Enable the PWR Clock */  __HAL_RCC_PWR_CLK_ENABLE();    /* Enable HSE oscillator and configure the PLL to reach the max system frequency (216 MHz)     when using HSE oscillator as PLL clock source. */  SystemClock_Config();  /* Output SYSCLK / 2 on MCO2 pin(PC.09) */  HAL_RCC_MCOConfig(RCC_MCO2, RCC_MCO2SOURCE_SYSCLK, RCC_MCODIV_2);  /* Since MFX is used, LED init is done after clock config */  /* Configure LED1 and LED3 */  BSP_LED_Init(LED1);  BSP_LED_Init(LED3);  /* Toggle some leds in an infinite loop */  while (1)  {    /* check if user button has been pressed to switch clock config */    if(SwitchClock != RESET)    {      SwitchSystemClock();    }        /* Toggle LED1 */    BSP_LED_Toggle(LED1);    HAL_Delay(100);  }}
开发者ID:vlsi1217,项目名称:STM32F7Cube,代码行数:56,


示例15: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* Enable the CPU Cache */  CPU_CACHE_Enable();    /* STM32F7xx HAL library initialization:       - Configure the Flash ART accelerator on ITCM interface       - Configure the Systick to generate an interrupt each 1 msec       - Set NVIC Group Priority to 4       - Global MSP (MCU Support Package) initialization     */     HAL_Init();    /* Configure the system clock to 200 MHz */  SystemClock_Config();   /* Init Audio Application */  AUDIO_InitApplication();  /* Init Host Library */  USBH_Init(&hUSBHost, USBH_UserProcess, 0);  /* Add Supported Class */  USBH_RegisterClass(&hUSBHost, USBH_MSC_CLASS);    /* Start Host Process */  USBH_Start(&hUSBHost);    /* Run Application (Blocking mode) */  while (1)  {    /* USB Host Background task */    USBH_Process(&hUSBHost);        /* AUDIO Menu Process */    AUDIO_MenuProcess();    if ( MfxToggleLed == 1)    { #if defined(USE_STM32756G_EVAL_REVA)      /* On RevA board, as LED1 is connected to MFX, the toggle is performed in main loop */      BSP_LED_Toggle(LED1);#else      /* On RevB board, as LED1 is connected to GPIO, it is toggled in ISR,       * the LED4 is toggled in main loop as it is connected to MFX */      BSP_LED_Toggle(LED4);#endif      MfxToggleLed = 0;    }  }}
开发者ID:acrepina,项目名称:STM32F7_serverWEB,代码行数:56,


示例16: main

int main(void){	uint8_t  lcd_status = LCD_OK;	CPU_CACHE_Enable();	HAL_Init();	/* Configura el reloj del sistema en 200 Mhz */	SystemClock_Config();	BSP_LED_Init(LED1);	/*Configura el botón de usuario en modo GPIO*/	BSP_PB_Init(BUTTON_KEY, BUTTON_MODE_GPIO);	/*Inicializar LCD*/	lcd_status = BSP_LCD_Init();	if(lcd_status != LCD_OK)		while(1);	/*Inicializa LCD Layers*/	BSP_LCD_LayerDefaultInit(LTDC_ACTIVE_LAYER, SDRAM_DEVICE_ADDR);	Display_Description();	uint8_t detectSD = 0;	uint8_t SD_state = MSD_OK;	while(1){		if(BSP_PB_GetState(BUTTON_KEY) != 0){			HAL_Delay(500);			Display_Description();			detectSD = 1;		}		if(detectSD){			detectSD = 0;			SD_state = BSP_SD_Init();			if(SD_state != MSD_OK){				BSP_LCD_ClearStringLine(11);				BSP_LCD_ClearStringLine(12);				BSP_LCD_DisplayStringAt(0, (BSP_LCD_GetYSize()/2.5)+25, (uint8_t *)"Tarjeta SD no encontrada", CENTER_MODE);			}			else{				BSP_LCD_ClearStringLine(11);				BSP_LCD_ClearStringLine(12);				BSP_LCD_DisplayStringAt(0, (BSP_LCD_GetYSize()/2.5)+25, (uint8_t *)"Tarjeta SD encontrada", CENTER_MODE);			}		}	}}
开发者ID:aescacena,项目名称:stm32f7,代码行数:51,


示例17: main

/**  * @brief  Main program.  * @param  None  * @retval None  */int main(void){  /* Enable the CPU Cache */  CPU_CACHE_Enable();	  /* STM32F7xx HAL library initialization:       - Configure the Flash ART accelerator on ITCM interface       - Systick timer is configured by default as source of time base, but user          can eventually implement his proper time base source (a general purpose          timer for example or other time source), keeping in mind that Time base          duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and          handled in milliseconds basis.       - Set NVIC Group Priority to 4       - Low Level Initialization     */  HAL_Init();  /* Configure the system clock to 216 MHz */  SystemClock_Config();  /* Configure LED3 */  BSP_LED_Init(LED3);  /*##-1- TIM Peripheral Configuration ######################################*/  TIM_Config();  /*##-2- Configure the ADC peripheral ######################################*/  ADC_Config();  /*##-4- Start the conversion process and enable interrupt ##################*/  if (HAL_ADC_Start_IT(&AdcHandle) != HAL_OK)  {    /* Start Conversation Error */    Error_Handler();  }    __HAL_RCC_DAC_CLK_ENABLE();    /*##-3- TIM counter enable ################################################*/  if (HAL_TIM_Base_Start(&htim) != HAL_OK)  {    /* Counter Enable Error */    Error_Handler();  }  /* Infinite loop */  while (1)  {  }}
开发者ID:vlsi1217,项目名称:STM32F7Cube,代码行数:55,


示例18: main

/**  * @brief  Main program  * @param  None  * @retval None  */ int main(void){  uint8_t  lcd_status = LCD_OK;    CPU_CACHE_Enable();  /* STM32F7xx HAL library initialization:       - Configure the Flash prefetch, instruction and Data caches       - Configure the Systick to generate an interrupt each 1 msec       - Set NVIC Group Priority to 4       - Global MSP (MCU Support Package) initialization     */  HAL_Init();  /* Configure the system clock to 200 Mhz */  SystemClock_Config();  BSP_LED_Init(LED1);  /* Configure the User Button in GPIO Mode */  BSP_PB_Init(BUTTON_KEY, BUTTON_MODE_GPIO);  /*##-1- Initialize the LCD #################################################*/  /* Initialize the LCD */  lcd_status = BSP_LCD_Init();  ASSERT(lcd_status != LCD_OK);  /* Initialize the LCD Layers */  BSP_LCD_LayerDefaultInit(LTDC_ACTIVE_LAYER, LCD_FRAME_BUFFER);  Display_DemoDescription();  /* Wait For User inputs */  while (1)  {    if (BSP_PB_GetState(BUTTON_KEY) != RESET)    {      HAL_Delay(10);      while (BSP_PB_GetState(BUTTON_KEY) != RESET);      BSP_examples[DemoIndex++].DemoFunc();      if (DemoIndex >= COUNT_OF_EXAMPLE(BSP_examples))      {        /* Increment number of loops which be used by EEPROM example */        NbLoop++;        DemoIndex = 0;      }      Display_DemoDescription();    }  } /* of while (1) */}
开发者ID:MrZANE42,项目名称:verisure1512,代码行数:55,


示例19: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* Enable the CPU Cache */  CPU_CACHE_Enable();    /* STM32F7xx HAL library initialization:       - Configure the Flash ART accelerator on ITCM interface       - Configure the Systick to generate an interrupt each 1 msec       - Set NVIC Group Priority to 4       - Low Level Initialization     */  HAL_Init();    /* Configure the System clock to have a frequency of 200 Mhz */  SystemClock_Config();      /* Init Dual Core Application */  DUAL_InitApplication();    /* Init HS Core */  USBH_Init(&hUSBHost_HS, USBH_HS_UserProcess, 1);    /* Init FS Core */  USBH_Init(&hUSBHost_FS, USBH_FS_UserProcess, 0);    /* Add Supported Classes */  USBH_RegisterClass(&hUSBHost_HS, USBH_MSC_CLASS);  USBH_RegisterClass(&hUSBHost_FS, USBH_HID_CLASS);    /* Start Host Process */  USBH_Start(&hUSBHost_FS);  USBH_Start(&hUSBHost_HS);   /* Register the file system object to the FatFs module */  if(f_mount(&USBH_fatfs, "", 0) != FR_OK)  {      LCD_ErrLog("ERROR : Cannot Initialize FatFs! /n");  }    /* Run Application (Blocking mode)*/  while (1)  {    /* USB Host Background tasks */    USBH_Process(&hUSBHost_FS);     USBH_Process(&hUSBHost_HS);        /* DUAL Menu Process */    DUAL_MenuProcess();   } }
开发者ID:acrepina,项目名称:STM32F7_serverWEB,代码行数:55,


示例20: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* This project template calls firstly two functions in order to configure MPU feature      and to enable the CPU Cache, respectively MPU_Config() and CPU_CACHE_Enable().     These functions are provided as template implementation that User may integrate      in his application, to enhance the performance in case of use of AXI interface      with several masters. */     /* Configure the MPU attributes as Write Through */  MPU_Config();  /* Enable the CPU Cache */  CPU_CACHE_Enable();#ifdef RTE_CMSIS_RTOS                   // when using CMSIS RTOS  osKernelInitialize();                 // initialize CMSIS-RTOS#endif  /* STM32F7xx HAL library initialization:       - Configure the Flash ART accelerator on ITCM interface       - Configure the Systick to generate an interrupt each 1 msec       - Set NVIC Group Priority to 4       - Low Level Initialization     */  HAL_Init();  /* Configure the System clock to have a frequency of 216 MHz */  SystemClock_Config();  /* Add your application code here     */	BSP_SDRAM_Init();	Touch_Initialize();	#ifdef RTE_CMSIS_RTOS                   // when using CMSIS RTOS	Init_Thread1();	Init_Thread2();  osKernelStart();                      // start thread execution #endif	Analyzer_Init();	GUI_Init();	osMutexWait(mid_Thread_Mutex,osWaitForever);	Hello_MSG();	osMutexRelease(mid_Thread_Mutex);	osThreadTerminate(osThreadGetId());}
开发者ID:AdrK,项目名称:STM32F7_MULTITHREAD,代码行数:53,


示例21: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* Enable the CPU Cache */  CPU_CACHE_Enable();	  /* This sample code shows how to use GPIO HAL API to toggle GPIOA-GPIO_PIN_0 IO    in an infinite loop. It is possible to connect a LED between GPIOA-GPIO_PIN_0    output and ground via a 330ohm resistor to see this external LED blink.    Otherwise an oscilloscope can be used to see the output GPIO signal */  /* STM32F7xx HAL library initialization:       - Configure the Flash ART accelerator on ITCM interface       - Systick timer is configured by default as source of time base, but user          can eventually implement his proper time base source (a general purpose          timer for example or other time source), keeping in mind that Time base          duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and          handled in milliseconds basis.       - Set NVIC Group Priority to 4       - Low Level Initialization     */  if (HAL_Init() != HAL_OK)  {    Error_Handler();  }  /* Configure the system clock to 216 MHz */  SystemClock_Config();  /* -1- Enable each GPIO Clock (to be able to program the configuration registers) */  __HAL_RCC_GPIOF_CLK_ENABLE();    /* -2- Configure IOs in output push-pull mode to drive external LEDs */  GPIO_InitStruct.Mode  = GPIO_MODE_OUTPUT_PP;  GPIO_InitStruct.Pull  = GPIO_PULLUP;  GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;  GPIO_InitStruct.Pin = GPIO_PIN_10;  HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);    /* -3- Toggle IOs in an infinite loop */  while (1)  {    HAL_GPIO_TogglePin(GPIOF, GPIO_PIN_10);    /* Insert delay 100 ms */    HAL_Delay(100);  }}
开发者ID:MrZANE42,项目名称:verisure1512,代码行数:53,


示例22: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* Enable the CPU Cache */  CPU_CACHE_Enable();    /* STM32F7xx HAL library initialization:       - Configure the Flash ART accelerator on ITCM interface       - Systick timer is configured by default as source of time base, but user          can eventually implement his proper time base source (a general purpose          timer for example or other time source), keeping in mind that Time base          duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and          handled in milliseconds basis.       - Set NVIC Group Priority to 4       - Low Level Initialization     */  HAL_Init();  /* Configure the system clock to 216 MHz */  SystemClock_Config();    /* Configure LED1, LED3 */  BSP_LED_Init(LED1);  BSP_LED_Init(LED3);  /* Enable Power Clock */  __HAL_RCC_PWR_CLK_ENABLE();    /* Check if the system was resumed from StandBy mode */  if (__HAL_PWR_GET_FLAG(PWR_FLAG_SB) != RESET)  {    /* Wait that user release the Tamper push-button */    BSP_PB_Init(BUTTON_TAMPER, BUTTON_MODE_GPIO);    while(BSP_PB_GetState(BUTTON_TAMPER) == GPIO_PIN_SET){}  }  /* Initialize the Tamper push-button to generate external interrupts */  BSP_PB_Init(BUTTON_TAMPER, BUTTON_MODE_EXTI);  /* RTC configuration */  RTC_Config();  /* Turn on LED1 */  BSP_LED_On(LED1);  while (1)  {  }}
开发者ID:MrZANE42,项目名称:verisure1512,代码行数:53,


示例23: main

int main(void) {	CPU_CACHE_Enable();	HAL_Init();	SystemClock_Config();	BSP_LED_Init(LED_GREEN);	BSP_PB_Init(BUTTON_KEY, BUTTON_MODE_EXTI);	// Start timer w/ 2sec interval	initTimer(20000);	// Infinite Loop	while (1) {	}}
开发者ID:filtercodes,项目名称:ws-ldn-4,代码行数:16,


示例24: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* Enable the CPU Cache */  CPU_CACHE_Enable();  /* STM32F7xx HAL library initialization:       - Configure the Flash ART accelerator on ITCM interface       - Configure the Systick to generate an interrupt each 1 msec       - Set NVIC Group Priority to 4       - Low Level Initialization     */  HAL_Init();      /* Configure the system clock to 216 MHz */  SystemClock_Config();    /* Configure LED1, LED2, LED3 and LED4 */  BSP_LED_Init(LED1);  BSP_LED_Init(LED2);  BSP_LED_Init(LED3);  BSP_LED_Init(LED4);     /* Creates the mutex  */  osMutexDef(osMutex);  osMutex = osMutexCreate(osMutex(osMutex));    if(osMutex != NULL)  {    /* Define and create the high priority thread */    osThreadDef(MutHigh, MutexHighPriorityThread, osPriorityBelowNormal, 0, configMINIMAL_STACK_SIZE);    osHighPriorityThreadHandle = osThreadCreate(osThread(MutHigh), NULL);        /* Define and create the medium priority thread */    osThreadDef(MutMedium, MutexMeduimPriorityThread, osPriorityLow, 0, configMINIMAL_STACK_SIZE);    osMediumPriorityThreadHandle = osThreadCreate(osThread(MutMedium), NULL);        /* Define and create the low priority thread */    osThreadDef(MutLow, MutexLowPriorityThread, osPriorityIdle, 0, configMINIMAL_STACK_SIZE);    osThreadCreate(osThread(MutLow), NULL);  }    /* Start scheduler */  osKernelStart();  /* We should never get here as control is now taken by the scheduler */  for(;;);}
开发者ID:RadMie,项目名称:STM32F7DiscoveryBase,代码行数:52,


示例25: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){    /* Enable the CPU Cache */    CPU_CACHE_Enable();    /* STM32F7xx HAL library initialization:         - Configure the Flash ART accelerator on ITCM interface         - Configure the Systick to generate an interrupt each 1 msec         - Set NVIC Group Priority to 4         - Global MSP (MCU Support Package) initialization       */    HAL_Init();    /* Configure the system clock to 200 MHz */    SystemClock_Config();    /* Configure the BSP */    BSP_Config();    /* Initialize the LwIP stack */    lwip_init();    /* Configure the Network interface */    Netif_Config();    /* Http webserver Init */    httpd_init();    /* Notify user about the network interface config */    User_notification(&gnetif);    /* Infinite loop */    while (1)    {        /* Read a received packet from the Ethernet buffers and send it           to the lwIP for handling */        ethernetif_input(&gnetif);        /* Handle timeouts */        sys_check_timeouts();#ifdef USE_DHCP        /* handle periodic timers for DHCP */        DHCP_Periodic_Handle(&gnetif);#endif    }}
开发者ID:vlsi1217,项目名称:STM32F7Cube,代码行数:52,


示例26: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* Enable the CPU Cache */  CPU_CACHE_Enable();	  /* STM32F7xx HAL library initialization:       - Configure the Flash ART accelerator on ITCM interface       - Systick timer is configured by default as source of time base, but user          can eventually implement his proper time base source (a general purpose          timer for example or other time source), keeping in mind that Time base          duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and          handled in milliseconds basis.       - Set NVIC Group Priority to 4       - Low Level Initialization     */  HAL_Init();  /* Configure the system clock to 216 MHz */  SystemClock_Config();    /* Configure LED1 and LED3 */  BSP_LED_Init(LED1);  BSP_LED_Init(LED3);  if(CAN_Polling() == HAL_OK)  {    /* OK: Turn on LED1 */    BSP_LED_On(LED1);  }  else  {    /* KO */    /* Toggle LED3 */    while(1)    {      BSP_LED_Toggle(LED3);    }  }    /* Infinite loop */  while (1)  {  } }
开发者ID:vlsi1217,项目名称:STM32F7Cube,代码行数:49,


示例27: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* Enable the CPU Cache */  CPU_CACHE_Enable();    /* STM32F7xx HAL library initialization:       - Configure the Flash ART accelerator on ITCM interface       - Configure the Systick to generate an interrupt each 1 msec       - Set NVIC Group Priority to 4       - Low Level Initialization     */  HAL_Init();    /* Configure the System clock to have a frequency of 216 MHz */  SystemClock_Config();      /* Configure LED1 and LED3 */  BSP_LED_Init(LED1);  BSP_LED_Init(LED3);    /* Initialize Joystick */  if (BSP_JOY_Init(JOY_MODE_GPIO) == 0)  {    JoyButtonInitialized = 1;  }    /* Configure Key button for remote wakeup */  BSP_PB_Init(BUTTON_TAMPER, BUTTON_MODE_EXTI);    /* Init Device Library */  USBD_Init(&USBD_Device, &HID_Desc, 0);    /* Add Supported Class */  USBD_RegisterClass(&USBD_Device, USBD_HID_CLASS);    /* Start Device Process */  USBD_Start(&USBD_Device);    /* Run Application (Interrupt mode) */  while (1)  {  }}
开发者ID:MrZANE42,项目名称:verisure1512,代码行数:48,


示例28: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* Enable the CPU Cache */  CPU_CACHE_Enable();   /* This sample code shows how to configure The HAL time base source base with a     dedicated  Tick interrupt priority.    A general purpose timer(TIM6) is used instead of Systick  as source of  time base.      Time base duration is fixed to 1ms  since PPP_TIMEOUT_VALUEs are defined and     handled in milliseconds basis.    */  /* STM32F7xx HAL library initialization:       - Configure the Flash ART accelerator on ITCM interface       - Systick timer is configured by default as source of time base, but user          can eventually implement his proper time base source (a general purpose          timer for example or other time source), keeping in mind that Time base          duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and          handled in milliseconds basis.       - Set NVIC Group Priority to 4       - Low Level Initialization     */  HAL_Init();    /* Configure the system clock to 216 MHz */  SystemClock_Config();  /* Configure LED1 */  BSP_LED_Init(LED1);    /* Configure Tamper push-button */   BSP_PB_Init(BUTTON_TAMPER, BUTTON_MODE_EXTI);  /* Insert a Delay of 1000 ms and toggle LED1, in an infinite loop */    while (1)  {    /* Insert a 1s delay */    HAL_Delay(1000);        /* Toggle LED1 */    BSP_LED_Toggle(LED1);  }}
开发者ID:MrZANE42,项目名称:verisure1512,代码行数:48,


示例29: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){    /* Enable the CPU Cache */    CPU_CACHE_Enable();    /* STM32F7xx HAL library initialization:         - Configure the Flash ART accelerator on ITCM interface         - Configure the Systick to generate an interrupt each 1 msec         - Set NVIC Group Priority to 4         - Low Level Initialization       */    HAL_Init();    /* Configure the System clock to have a frequency of 200 Mhz */    SystemClock_Config();    /* Initialize IO expander */    BSP_IO_Init();    /* Init CDC Application */    CDC_InitApplication();    /* Init Host Library */    USBH_Init(&hUSBHost, USBH_UserProcess, 0);    /* Add Supported Class */    USBH_RegisterClass(&hUSBHost, USBH_CDC_CLASS);    /* Start Host Process */    USBH_Start(&hUSBHost);    /* Run Application (Blocking mode) */    while (1)    {        /* USB Host Background task */        USBH_Process(&hUSBHost);        /* CDC Menu Process */        CDC_MenuProcess();    }}
开发者ID:acrepina,项目名称:STM32F7_serverWEB,代码行数:46,


示例30: main

/**  * @brief  Main program  * @param  None  * @retval None  */int main(void){  /* Enable the CPU Cache */  CPU_CACHE_Enable();  /* STM32F7xx HAL library initialization:       - Configure the Flash ART accelerator on ITCM interface       - Configure the Systick to generate an interrupt each 1 msec       - Set NVIC Group Priority to 4       - Low Level Initialization     */  HAL_Init();      /* Configure the system clock to 216 Mhz */  SystemClock_Config();    /* Configure GPIO's to AN to reduce power consumption */  GPIO_ConfigAN();    /* Configure LED1 */  BSP_LED_Init(LED1);    /* Create the queue used by the two threads */  osMessageQDef(osqueue, QUEUE_LENGTH, uint16_t);  osQueue = osMessageCreate (osMessageQ(osqueue), NULL);    /* Note the Tx has a lower priority than the Rx when the threads are     spawned. */  osThreadDef(RxThread, QueueReceiveThread, osPriorityNormal, 0, configMINIMAL_STACK_SIZE);  osThreadCreate(osThread(RxThread), NULL);    osThreadDef(TxThread, QueueSendThread, osPriorityBelowNormal, 0, configMINIMAL_STACK_SIZE);  osThreadCreate(osThread(TxThread), NULL);    /* Start scheduler */  osKernelStart();    /* We should never get here as control is now taken by the scheduler */  for(;;);}
开发者ID:RadMie,项目名称:STM32F7DiscoveryBase,代码行数:45,



注:本文中的CPU_CACHE_Enable函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ CPU_COUNT函数代码示例
C++ CPUID函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。