Workflow

  1. 1.
    Start FREQM measurement and wait until measure done then read result data.
    freqm_start_measure(&freqm_instance);
    while ((status = freqm_get_result_value(&freqm_instance, &measure_result))
            == FREQM_STATUS_MEASURE_BUSY) {
    };
    
  2. 2.
    The board LED is on to indicate a measurement data is read.
    case FREQM_STATUS_MEASURE_DONE:
        LED_On(LED_0_PIN);
        while (true) {
        }
    
  3. 3.
    The board LED is toggle to indicate measurement is overflow.
    case FREQM_STATUS_CNT_OVERFLOW:
        freqm_clear_overflow(&freqm_instance);
        while (true) {
            LED_Toggle(LED_0_PIN);
            volatile uint32_t delay = 50000;
            while(delay--) {
            }
        }