Hi Team,
We have a couple of questions, please answer them:
1. During startup we enable core Flash ECC using _coreEnableFlashEcc_ method. Are there any restrictions in executing this function call like whether interrupts can be enabled or disabled?
2. We have the following scenario:
Boot S/w which configures HCLK/GCLK as 20 MHz and VCLKx are also 20 MHz. For flash configuration,
/* - Setup flash read mode, address wait states and data wait states */
*flash_frdcntl = (Uint32)(0x00000000UL
| (0UL << 8UL)
| (0UL << 4UL)
| 1UL);
/* - Setup flash bank power modes */
*flash_fbfallback = (Uint32)(0x00000000UL
| ((Uint32)SYS_SLEEP << 14UL) /* BANK 7 */
| ((Uint32)SYS_ACTIVE << 2UL) /* BANK 1 */
| ((Uint32)SYS_ACTIVE << 0UL)); /* BANK 0 */
Now, this Boot loads Loader into RAM and gives control to it. This loader in its startup, configures System clock HCLK/GCLK as 180 MHz ad Vclkx as 20 MHz.
Accordingly Flash configuration will be
/** - Setup flash read mode, address wait states and data wait states */
flashWREG->FRDCNTL = 0x00000000U
| (uint32)((uint32)3U << 8U)
| (uint32)((uint32)1U << 4U)
| 1U;
/** - Setup flash access wait states for bank 7 */
FSM_WR_ENA_HL = 0x5U;
EEPROM_CONFIG_HL = 0x00000002U
| (uint32)((uint32)3U << 16U) ;
/** - Disable write access to flash state machine registers */
FSM_WR_ENA_HL = 0xAU;
/** - Setup flash bank power modes */
flashWREG->FBFALLBACK = 0x00000000U
| (uint32)((uint32)SYS_ACTIVE << 14U) /* BANK 7 */
| (uint32)((uint32)SYS_ACTIVE << 2U) /* BANK 1 */
| (uint32)((uint32)SYS_ACTIVE << 0U); /* BANK 0 */
Can we use like this?