I am working with the FRDM-MCXE31B development board, and I want to modify the frdmmcxe31b_emios_input_capture example program to enable the continuous counting mode for eMIOS. I have made the modifications as follows,
EMIOS_GetDefaultConfig(&emiosConfig);
emiosConfig.prescale = EXAMPLE_EMIOS_CLK_FREQ / EXAMPLE_COUNTERBUS_FREQ - 1U;
emiosConfig.useGlobalTimeBase = true;
EMIOS_Init(EXAMPLE_EMIOS, &emiosConfig);
ucMCConfig.period = 0xFFFFU;
ucMCConfig.prescale = 0U;
ucMCConfig.ucMode = kEMIOS_MC_UpCount;
ucMCConfig.clockSource = kEMIOS_ClkSrcInternal;
ucMCConfig.prescalerSource = kEMIOS_Prescaler_PrescaledClock;
ucMCConfig.counterResetTiming = kEMIOS_ResetMatchEnd;
ucMCConfig.reloadOutputDelay = 0U;
ucMCConfig.enableFreeze = false;
EMIOS_ConfigModulusCounter(EXAMPLE_EMIOS, &ucMCConfig, EXAMPLE_COUNTERBUS_CHANNEL);
ucICConfig.ucMode = kEMIOS_PEC_Continuous;//kEMIOS_IPWM;
ucICConfig.counterBus = kEMIOS_CounterBus_A;
ucICConfig.edgePolarity = kEMIOS_IC_RisingEdge;
ucICConfig.filterClock = kEMIOS_Filter_PrescaledClock;
ucICConfig.filterWidth = kEMIOS_Filter_16_Cycle;
ucICConfig.enableFreeze = false;
ucICConfig.startTime = 0x90;
ucICConfig.endTime = 0x800;
EMIOS_ConfigInputCapture(EXAMPLE_EMIOS, &ucICConfig, EXAMPLE_IC_CHANNEL);
// EMIOS_EnableUCInterrupt(EXAMPLE_EMIOS, EXAMPLE_IC_CHANNEL);
// (void)EnableIRQ(EXAMPLE_EMIOS_IRQn);
EMIOS_EnableUCPrescaler(EXAMPLE_EMIOS, EXAMPLE_COUNTERBUS_CHANNEL);
EMIOS_EnableUCPrescaler(EXAMPLE_EMIOS, EXAMPLE_IC_CHANNEL);
EMIOS_EnableGlobalPrescaler(EXAMPLE_EMIOS);
but I checked the relevant registers and found no changes at all. Could you please tell me how to configure it correctly, and which register I should read to get the counter value?