AT13481

Code

Copy-paste the following setup code to your user application:
/* FREQM module software instance (must not go out of scope while in use) */
static struct freqm_module freqm_instance;

void configure_freqm(void)
{
    /* Create a new configuration structure for the FREQM settings
     * and fill with the default module settings. */
    struct freqm_config config_freqm;
    freqm_get_config_defaults(&config_freqm);

    /* Alter any FREQM configuration settings here if required */

    /* Initialize FREQM with the user settings */
    freqm_init(&freqm_instance, FREQM, &config_freqm);
}
Add to user application initialization (typically the start of main()):
system_init();
configure_freqm();
freqm_enable(&freqm_instance);