1 Reply Latest reply on Jun 28, 2019 3:53 AM by PY_21

    Change counter period with interrupt attached

    AdCr_4275466

      I'm trying to change a TCPWM counter period after it has been started but running into an annoying problem. My program works as follows, the counter triggers an interrupt on overflow on the CM4, that interrupt lasts for around 160us or 100ns depending on control. Cm0 receives a BLE write request that is supposed to change the counter period to increase the frequency that the ISR is called on the CM4. When running normally and using the default value of the period, everything works perfect. When I try to use the CounterName_SetPeriod function on the CM0, the ISR is no longer called. CounterName_GetStatus returns that it is still counting as well. I've googled around and did a quick search on the forums and couldn't find anything related to this. I have tried disabling the counter, waiting, changing the period, waiting, and enabling it again but that did not work either. The default period is around 200Hz, I am trying to set it to 20Hz or 100Hz when it is failing. Chip is CYBLE-416045-02.