9.2.2.2 Workflow

  1. Start an asynchronous FREQM read job, to store measurement data into the global buffer and generate a callback when complete.
    freqm_start_measure(&freqm_instance);
    
  2. Wait until the asynchronous read job is complete.
    while (!freqm_read_done) {
    }
    status = freqm_get_result_value(&freqm_instance, &measure_result);
    
  3. The board LED on to indicate measurement data read.
    case FREQM_STATUS_MEASURE_DONE:
        LED_On(LED_0_PIN);
        while (true) {
        }
    
  4. The board LED toggled to indicate measurement overflow occous.
    case FREQM_STATUS_CNT_OVERFLOW:
        freqm_clear_overflow(&freqm_instance);
        while (true) {
            LED_Toggle(LED_0_PIN);
            volatile uint32_t delay = 50000;
            while(delay--) {
            }
        }