Jun 30, 2014
03:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 30, 2014
03:25 AM
Hello,
I am using the PWMSP001 app to create a specific delay in a μsec range {10-100} in my code (using NVIC002 app for the ISR) and though it seams to get out of the Loop I cannot see the actual delay.
Any suggestions?
This is the code :
void Set_Delay(void)
{
P0_2_set();
//PWMSP001_SetDutyCycle((PWMSP001_HandleType*)&PWMSP001_Handle0, duty_cycle_delay);
PWMSP001_Start((PWMSP001_HandleType*)&PWMSP001_Handle0);
while(Delay == 1)
{
;
}
Delay = 1;
PWMSP001_Stop((PWMSP001_HandleType*)&PWMSP001_Handle0);
P0_2_reset();
}
void Delay_CCU4_Compare_ISR(void)
{
Delay = 0;
P0_2_reset();
}
I am using the PWMSP001 app to create a specific delay in a μsec range {10-100} in my code (using NVIC002 app for the ISR) and though it seams to get out of the Loop I cannot see the actual delay.
Any suggestions?
This is the code :
void Set_Delay(void)
{
P0_2_set();
//PWMSP001_SetDutyCycle((PWMSP001_HandleType*)&PWMSP001_Handle0, duty_cycle_delay);
PWMSP001_Start((PWMSP001_HandleType*)&PWMSP001_Handle0);
while(Delay == 1)
{
;
}
Delay = 1;
PWMSP001_Stop((PWMSP001_HandleType*)&PWMSP001_Handle0);
P0_2_reset();
}
void Delay_CCU4_Compare_ISR(void)
{
Delay = 0;
P0_2_reset();
}
1 Reply
Jun 30, 2014
11:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 30, 2014
11:59 AM
I did the same as documented in the Arduino-to-XMC project:
http://code.google.com/p/arduino-to-xmc/wiki/delayMicroseconds
http://code.google.com/p/arduino-to-xmc/wiki/delayMicroseconds