This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @brief Configure the MPU attributes as Write Through for External SDRAM. | |
* @note The Base Address is 0xD0000000 . | |
* The Configured Region Size is 32MB because same as SDRAM size. | |
* @param None | |
* @retval None | |
*/ | |
void MPU_Config(void) | |
{ | |
MPU_Region_InitTypeDef MPU_InitStruct; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import subprocess | |
my_data = np.array([0, 0.1, 0.2, 0.3], dtype=np.float32) | |
np.array(my_data).tofile('my_data.bin') | |
subprocess.run(["xxd", "-i", "my_data.bin", "my_data.h"], capture_output=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###################################### | |
# target | |
###################################### | |
TARGET = Project | |
###################################### | |
# building variables | |
###################################### | |
# debug build? | |
DEBUG = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Private variables -------------------------------------------------------- */ | |
DMA2D_HandleTypeDef hdma2d; | |
/* Private function prototypes ---------------------------------------------- */ | |
static void DMA2D_Init(void); | |
static void DMA2D_Convert(void); | |
void DMA2D_Init(void) | |
{ | |
HAL_StatusTypeDef status; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
# This software component is licensed by ST under BSD 3-Clause license, | |
# the "License"; You may not use this file except in compliance with the | |
# License. You may obtain a copy of the License at: | |
# https://opensource.org/licenses/BSD-3-Clause | |
"""LogMel Feature Extraction example.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""TUT Acoustic scenes 2016 dataset. | |
""" | |
import os | |
import sys | |
import numpy as np | |
import zipfile | |
import librosa | |
from tqdm import tqdm | |
from keras.utils.data_utils import get_file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint32_t cycles; | |
cycles = 0; | |
CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk; | |
#ifdef STM32F7 | |
DWT->LAR = 0xC5ACCE55; | |
#endif | |
DWT->CYCCNT = 0; | |
DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_SYSCLK, RCC_MCODIV_4); | |
/** | |
* @brief Select the clock source to output on MCO pin(PA8). | |
* @note PA8 should be configured in alternate function mode. | |
* @param RCC_MCOx specifies the output direction for the clock source. | |
* For STM32L4xx family this parameter can have only one value: | |
* @arg @ref RCC_MCO1 Clock source to output on MCO1 pin(PA8). | |
* @param RCC_MCOSource specifies the clock source to output. | |
* This parameter can be one of the following values: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Jump to System Memory from User code | |
* NOTE: Code tested on STM32F107 | |
*/ | |
#define SYSTEM_MEMORY_ADDRESS 0x1FFFB000 | |
uint32_t JumpAddress; | |
/* Disable all peripheral clocks */ | |
RCC->APB1ENR = 0x0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*# 1- Identify the UART interface, GPIO pins and Alternate Function #########*/ | |
/* For example: | |
* B-L475E-IOT01A: | |
* PB6 ------> USART1_TX | |
* PB7 ------> USART1_RX | |
* | |
* NUCLEO-L476RG: | |
* PA2 ------> USART2_TX | |
* PA3 ------> USART2_RX | |
* |
NewerOlder