Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

XMC™ Forum Discussions

vasiliki
Employee
Employee
25 sign-ins 5 questions asked First question asked
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();

}
0 Likes
1 Reply
MaxECU
Employee
Employee
Welcome!
I did the same as documented in the Arduino-to-XMC project:
http://code.google.com/p/arduino-to-xmc/wiki/delayMicroseconds
0 Likes