Page 1 of 1

Problems with os-less

Posted: Thu Aug 16, 2018 12:29 pm
by aduss95
Hello,
I am trying to launch a GPT demo on STM32f429zi, using os-less. I make the project's makefile is going through successfully,
initialization of the timers too, but exit from gptStartContinuous function (& GPTD4, 5000) caused the program to stop working correctly.
Someone has similar problem or could give me some advice?

Re: Problems with os-less

Posted: Thu Aug 16, 2018 1:24 pm
by Giovanni
What is "stopped working correctly"?

Does it enter the callback?

Giovanni

Re: Problems with os-less

Posted: Thu Aug 16, 2018 1:41 pm
by aduss95
Yes it isn't enter to callback

Re: Problems with os-less

Posted: Thu Aug 16, 2018 1:45 pm
by Giovanni
Stop the program and see where it is stuck. If you need advice then provide info.

Giovanni

Re: Problems with os-less

Posted: Thu Aug 16, 2018 2:36 pm
by aduss95
so i try explain it,

this is my callback function :

// GPT4 callback.
static void gpt4cb(GPTDriver *gptp) {
(void)gptp;
palSetPad(GPIOB, 7);
osalSysLockFromISR();
gptStartOneShotI(&GPTD3, 1000); /* 0.1 second pulse.*/
osalSysUnlockFromISR();
}
// GPT3 callback.
static void gpt3cb(GPTDriver *gptp) {

(void)gptp;
palClearPad(GPIOB, 7);
}

so its my piece of code
//Initializes the GPT drivers 4 and 3.
gptStart(&GPTD4, &gpt4cfg);
gptPolledDelay(&GPTD4, 10); /* Small delay.*/
gptStart(&GPTD3, &gpt3cfg);
gptPolledDelay(&GPTD3, 10); /* Small delay.*/

while(1){
palSetPad(GPIOB, 0);
gptStartContinuous(&GPTD4, 5000);
osalThreadSleepMilliseconds(5000);
gptStopTimer(&GPTD4);
palClearPad(GPIOB, 0);
gptStartContinuous(&GPTD4, 5000);
osalThreadSleepMilliseconds(5000);
gptStopTimer(&GPTD4);
}
while debugging through this code step by step, gptStartContinuous(&GPTD4, 5000) this function have done, but callback functions didn't call out .
Then it execute the next function and doesn't go to gptSTOP