KL03Z, Flash Option Register FTFA_FOPT settings?

cancel
Showing results for 
Search instead for 
Did you mean: 

KL03Z, Flash Option Register FTFA_FOPT settings?

Jump to solution
639 Views
Contributor III

For the KL03 series MCUs:  Where are the settings for the Flash Option Register FTFA_FOPT defined?  The reference manual (section 27.3.3.4) refers to the "Chip's configuration settings."  Where are those?  I don't find those settings in the data sheet for the KL03Z.  Thanks in advance for clarifying.

Labels (1)
0 Kudos
1 Solution
6 Views
Specialist V

Hi

KL03 User's Manual:

- FTFA_FOPT - Section 6.3.2 FOPT boot options, table 6-2 "Flash Option Register (FTFA:FOPT) definition.

- LPTMRn_PSR[PCS] - Section 32.1.2 LPTMR prescaler/glitch filter clocking options.

Regards

Mark

View solution in original post

0 Kudos
5 Replies
6 Views
Specialist V

Thomas

The FTFA_FOPT register is loaded with the value in Flash at location 0x40c at reset.

Thereforefore you control the setting with the const values in the Flash configration area (0x400..0x40f).

// Flash configuration - this is linked at address 0x00000400 (when working with standalone-build)
//
const KINETIS_FLASH_CONFIGURATION __attribute__((section(".f_config"))) __flash_config
= {
    KINETIS_FLASH_CONFIGURATION_BACKDOOR_KEY,
    KINETIS_FLASH_CONFIGURATION_PROGRAM_PROTECTION,
    KINETIS_FLASH_CONFIGURATION_SECURITY,
    KINETIS_FLASH_CONFIGURATION_NONVOL_OPTION,
    KINETIS_FLASH_CONFIGURATION_EEPROM_PROT,
    KINETIS_FLASH_CONFIGURATION_DATAFLASH_PROT
};

Eg.

#define KINETIS_FLASH_CONFIGURATION_NONVOL_OPTION  (FTFL_FOPT_EZPORT_ENABLED | FTFL_FOPT_LPBOOT_NORMAL | FTFL_FOPT_NMI_DISABLED)

Regards

Mark

Kinetis: http://www.utasker.com/kinetis.html

KL03: http://www.utasker.com/kinetis/FRDM-KL03Z.html

For the complete "out-of-the-box" Kinetis experience and faster time to market

0 Kudos
6 Views
Contributor III

Thanks Mark, for your response.  I think I wasn't as clear as I should have been.  I need to know what the bits do, not the mechanics of how to set them.  Section 27.3.3.4 of the reference manual  states "The function of the bits is defined in the device's Chip Configuration details."  I don't know where to find the "Chip Configuration details" so I don't know what these bits control, so I don't know what their settings should be for my application.  What is the function of each of the FTFA_FOPT bits?  What document are they explained in?

Perhaps this is out of scope, but I have a similar issue with the  "LPTMRx_PSR field descriptions" in section 32.4.2.  Where are the details about the low four bits, for the "prescaler clock select"?  How do I know which clock source is selected?  What document shows that?
Thanks for your help with this.

0 Kudos
7 Views
Specialist V

Hi

KL03 User's Manual:

- FTFA_FOPT - Section 6.3.2 FOPT boot options, table 6-2 "Flash Option Register (FTFA:FOPT) definition.

- LPTMRn_PSR[PCS] - Section 32.1.2 LPTMR prescaler/glitch filter clocking options.

Regards

Mark

View solution in original post

0 Kudos
6 Views
Contributor III

Yes!  That's what I was missing.  Thank you!

A suggestion for the next revision of the KL03 Reference Manual:  It  would be helpful to refer to the sections you pointed out more clearly from the main register definition sections.  Simply saying that "The function of the bits is defined in the device's Chip Configuration details"  doesn't help much to find it in the same document.

Again, thanks for your help.

-Thomas

0 Kudos
6 Views
Specialist V

Thomas

I agree that the references to the configuration section are not that clear/obvious.

However I could find the liks that you were searching for by using the search function in Adobe Reader.

- FTFA_FOPT took me 20s to find

- LPTMRn_PSR[PCS] this one was easier (I searched LPTMR0_PSR and it took about 5s to locate it).

Therefore it should not normally pose a real difficulty.

Regards

Mark

0 Kudos