Browse Source

Fix FlexSPI2 speed setting, default to 88 MHz clock

teensy4-core
PaulStoffregen 4 years ago
parent
commit
1889c06e56
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      teensy4/startup.c

+ 2
- 2
teensy4/startup.c View File

@@ -333,8 +333,8 @@ FLASHMEM void configure_external_ram()
IOMUXC_FLEXSPI2_IPP_IND_SCK_FA_SELECT_INPUT = 1; // GPIO_EMC_25 for Mode: ALT8

// turn on clock (TODO: increase clock speed later, slow & cautious for first release)
CCM_CBCMR = (CCM_CBCMR & (CCM_CBCMR_FLEXSPI2_PODF_MASK | CCM_CBCMR_FLEXSPI2_CLK_SEL_MASK))
| CCM_CBCMR_FLEXSPI2_PODF(7) | CCM_CBCMR_FLEXSPI2_CLK_SEL(0); // 49.5 MHz
CCM_CBCMR = (CCM_CBCMR & ~(CCM_CBCMR_FLEXSPI2_PODF_MASK | CCM_CBCMR_FLEXSPI2_CLK_SEL_MASK))
| CCM_CBCMR_FLEXSPI2_PODF(5) | CCM_CBCMR_FLEXSPI2_CLK_SEL(3); // 88 MHz
CCM_CCGR7 |= CCM_CCGR7_FLEXSPI2(CCM_CCGR_ON);

FLEXSPI2_MCR0 |= FLEXSPI_MCR0_MDIS;

Loading…
Cancel
Save