Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
Hello!
I am working on a testing device for power grids. In my application I need to sample a signal with frequency 10240Hz. I wanted to use a Ticker object and perform sampling in an interrupt, but I have a problem - when Ticker period is less than 100us (and I need 98us) an interrupt does not execute.
Here is my sample code:
When Ticker period is greater or equal to 100 everything works fine. When I go below 100 program freezes and no interrupt is executed. Function ticker.attach() gives the same result.
Do you have any ideas why it happens? Or how can I sample signal with given frequency in other way?