Not applicable
Aug 27, 2015
09:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 27, 2015
09:10 AM
Hi,
I am working with xmc4500 relax kit and having a problems with POSIF interrupts. I want to track the positions so i am using POSQE001 App. I want to have two interrupts at position counter compare match and position counter period match. These two interrupts are mapped to my own functions with two NVIC002 apps. I am only able to get period match interrupt only in one direction. Compare match interrupt does not occur no matter what i do. Also in order to get period match interrupt, i have to check the option in POSQE001 App GUI setting panel (Enable Position counter overflow event) in addition to manually enabling the event in main function with the following code. if i do not check it this, then period match interrupt also does not occur.
I dont know why i need to enable the GUI option, when i am enabling the events manually. but the problem does not end here this period match interrupt only occurs in one direction of movement but not in the other direction e.g it occurs only in Clockwise direction, but not in anti- clockwise direction. it should occur in both directions.
could anyone please explain what the option in POSQE001 App GUI setting panel (enable Position counter overflow event) means, what does it do, why is it necessary. and is it necessary to check if i am enabling the events manually. because if i do not check it and enable the events manually then both interrupts does not work.
secondly and most Importantly, please someone help me how to get compare match interrupt and period match interrupt working in both directions. I am also enabling the events manually and setting CompareMatch and PeriodMatch values with the following code in main function, but nothing is helping.
and also one more question when does Position counter Event 0,1 and 2 interrupts occur? what are Position counter Event 0,1 and 2?
I am working with xmc4500 relax kit and having a problems with POSIF interrupts. I want to track the positions so i am using POSQE001 App. I want to have two interrupts at position counter compare match and position counter period match. These two interrupts are mapped to my own functions with two NVIC002 apps. I am only able to get period match interrupt only in one direction. Compare match interrupt does not occur no matter what i do. Also in order to get period match interrupt, i have to check the option in POSQE001 App GUI setting panel (Enable Position counter overflow event) in addition to manually enabling the event in main function with the following code. if i do not check it this, then period match interrupt also does not occur.
Status = POSQE001_EnableEvent((POSQE001_HandleType*)&POSQE001_Handle0,POSQE001_POSITION_COUNTER,POSQE001_CCU_PERIOD_MATCH);
I dont know why i need to enable the GUI option, when i am enabling the events manually. but the problem does not end here this period match interrupt only occurs in one direction of movement but not in the other direction e.g it occurs only in Clockwise direction, but not in anti- clockwise direction. it should occur in both directions.
could anyone please explain what the option in POSQE001 App GUI setting panel (enable Position counter overflow event) means, what does it do, why is it necessary. and is it necessary to check if i am enabling the events manually. because if i do not check it and enable the events manually then both interrupts does not work.
secondly and most Importantly, please someone help me how to get compare match interrupt and period match interrupt working in both directions. I am also enabling the events manually and setting CompareMatch and PeriodMatch values with the following code in main function, but nothing is helping.
int main(void)
{
status_t Status;
Status = POSQE001_EnableEvent((POSQE001_HandleType*)&POSQE001_Handle0,
POSQE001_POSITION_COUNTER,
POSQE001_CCU_PERIOD_MATCH);
Status = POSQE001_EnableEvent((POSQE001_HandleType*)&POSQE001_Handle0,
POSQE001_POSITION_COUNTER,
POSQE001_CCU_UP_COMPARE_MATCH);
Status = POSQE001_EnableEvent((POSQE001_HandleType*)&POSQE001_Handle0,
POSQE001_POSITION_COUNTER,
POSQE001_CCU_DOWN_COMPARE_MATCH);
Status = POSQE001_Start(&POSQE001_Handle0);
Status = POSQE001_SetPeriodCounterPM(&POSQE001_Handle0, 80);
Status = POSQE001_SetPeriodCounterCM(&POSQE001_Handle0, 40);
}
and also one more question when does Position counter Event 0,1 and 2 interrupts occur? what are Position counter Event 0,1 and 2?
1 Reply
Not applicable
Aug 28, 2015
02:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 28, 2015
02:28 AM
Hi,
Please refer to the reply in DAVE Forum. ( http://www.infineonforums.com/threads/3273-POSIF-Interrupts-XMC-4500-Relax-kit#itags)
Regards,
Daryl
Please refer to the reply in DAVE Forum. ( http://www.infineonforums.com/threads/3273-POSIF-Interrupts-XMC-4500-Relax-kit#itags)
Regards,
Daryl