Apr 01, 2019
12:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 01, 2019
12:50 PM
Hi,
Im have been running into a strange issue:
I am using the capture compare unit to generate a single pulse and poll the line after the pulse. The CCU4 is configured in single shot mode, Edge aligned and compare mode. In addition, the CCU4 generates an interrupt on a compare match and an interrupt on period match.
I am performing sequence the following in software:
1. Set up period and compare, period values. Load values by triggering a shadow transfer
2. Start Timer
3. Wait for compare interrupt
4. Change a GPIO
5.Wait for Period Interrupt
However, when i run the following sequence sequentially ( back to back executions), i found that the sequence only works when i insert a 300 microsecond delay between each sequence execution. Without the delay, the period interrupt executes before the compare interrupt and causes issues with my program.
I was wondering if there is there is a delay that is needed between when a timer ends is single shot mode and when new values can be loaded using a shadow transfer ?
Note: I clear each interrupt flag with the ISR routine.
Im have been running into a strange issue:
I am using the capture compare unit to generate a single pulse and poll the line after the pulse. The CCU4 is configured in single shot mode, Edge aligned and compare mode. In addition, the CCU4 generates an interrupt on a compare match and an interrupt on period match.
I am performing sequence the following in software:
1. Set up period and compare, period values. Load values by triggering a shadow transfer
2. Start Timer
3. Wait for compare interrupt
4. Change a GPIO
5.Wait for Period Interrupt
However, when i run the following sequence sequentially ( back to back executions), i found that the sequence only works when i insert a 300 microsecond delay between each sequence execution. Without the delay, the period interrupt executes before the compare interrupt and causes issues with my program.
I was wondering if there is there is a delay that is needed between when a timer ends is single shot mode and when new values can be loaded using a shadow transfer ?
Note: I clear each interrupt flag with the ISR routine.
0 Replies