Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Change the FMC frequency source to HCLK#995

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Bexin3 wants to merge2 commits intoarduino:main
base:main
Choose a base branch
Loading
fromBexin3:main
Open
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 1 addition & 23 deletionslibraries/Portenta_SDRAM/src/ram_internal.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -38,29 +38,7 @@ static HAL_StatusTypeDef FMC_SDRAM_Clock_Config(void)
RCC_PeriphCLKInitTypeDef RCC_PeriphCLKInitStruct;

RCC_PeriphCLKInitStruct.PeriphClockSelection = RCC_PERIPHCLK_FMC;
RCC_PeriphCLKInitStruct.FmcClockSelection = RCC_FMCCLKSOURCE_PLL2;
#ifdef ARDUINO_GIGA
/* 16MHz HSE */
/* PLL2_VCO Input = HSE_VALUE/PLL2_M = (16/4) = 4 Mhz */
/* PLL2_VCO Output = PLL2_VCO Input * PLL_N = 4*100 = 400 Mhz */
/* FMC Kernel Clock = PLL2_VCO Output/PLL_R = 400/2 = 200 Mhz */
RCC_PeriphCLKInitStruct.PLL2.PLL2RGE = RCC_PLL2VCIRANGE_2;
RCC_PeriphCLKInitStruct.PLL2.PLL2M = 4;
RCC_PeriphCLKInitStruct.PLL2.PLL2N = 100;
#else
/* 25MHz HSE */
/* PLL2_VCO Input = HSE_VALUE/PLL2_M = 25/5 = 5 Mhz */
/* PLL2_VCO Output = PLL2_VCO Input * PLL_N = 5*80 = 400 Mhz */
/* FMC Kernel Clock = PLL2_VCO Output/PLL_R = 400/2 = 200 Mhz */
RCC_PeriphCLKInitStruct.PLL2.PLL2RGE = RCC_PLL2VCIRANGE_2;
RCC_PeriphCLKInitStruct.PLL2.PLL2M = 5;
RCC_PeriphCLKInitStruct.PLL2.PLL2N = 80;
#endif
RCC_PeriphCLKInitStruct.PLL2.PLL2FRACN = 0;
RCC_PeriphCLKInitStruct.PLL2.PLL2P = 2;
RCC_PeriphCLKInitStruct.PLL2.PLL2Q = 2;
RCC_PeriphCLKInitStruct.PLL2.PLL2R = 2;
RCC_PeriphCLKInitStruct.PLL2.PLL2VCOSEL = RCC_PLL2VCOWIDE;
RCC_PeriphCLKInitStruct.FmcClockSelection = RCC_FMCCLKSOURCE_HCLK;
return HAL_RCCEx_PeriphCLKConfig(&RCC_PeriphCLKInitStruct);
}

Expand Down
6 changes: 6 additions & 0 deletionslibraries/Portenta_SDRAM/src/ram_internal.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,7 +14,13 @@ bool sdram_init(void);
#define MICROPY_HW_SDRAM_TIMING_TRP (3)
#define MICROPY_HW_SDRAM_TIMING_TRCD (3)
#define MICROPY_HW_SDRAM_REFRESH_RATE (64) // ms

#ifdef ARDUINO_GIGA
#define MICROPY_HW_SDRAM_FREQUENCY (120000) // 100 MHz
#else
#define MICROPY_HW_SDRAM_FREQUENCY (100000) // 100 MHz
#endif

#define MICROPY_HW_SDRAM_REFRESH_CYCLES 4096

#define MICROPY_HW_SDRAM_BURST_LENGTH 1
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp