- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Everyone,
Can I use the system tick timer in PSoC4 BLE for periodic interrupt in my program. I want to get an interrupt for every 100ms and in ISR, I check the flag for each task and then I will perform the task according to the flag for periodic operation but I am afraid that it will interfere the bluetooth operation.How can I avoid it?
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The systick timer uses the Cortex M0 internal clock for counting. So if you are implementing low power code, this would not be the best way to switch task. Why don't you use Watch Dog Timers instead?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The systick timer uses the Cortex M0 internal clock for counting. So if you are implementing low power code, this would not be the best way to switch task. Why don't you use Watch Dog Timers instead?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use 1/8sec WDT ISR on PROC BLE, as main wakes up after any ISR, the ISR itself just clears its flag and nothing more.
main then OR regular event flag with 125ms flag
unsigned int temp = event.all; // atomic way to copy & clear
check.all = temp | ms125.all; // OR both
event.all &= ~temp;
ms125.all = 0;
It then a row of if-statment to gosub to each statemachines that told the system to come back after this 125ms delay.
A copy of the flag structure is also used for sleep and deepsleep if it's needs PWM to stay on etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Really thanks for your pieces of advice and I will work on it.