Problems with os-less

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
Post Reply
aduss95
Posts: 3
Joined: Mon Aug 13, 2018 11:32 am

Problems with os-less

Post 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?
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Problems with os-less

Post by Giovanni »

What is "stopped working correctly"?

Does it enter the callback?

Giovanni
aduss95
Posts: 3
Joined: Mon Aug 13, 2018 11:32 am

Re: Problems with os-less

Post by aduss95 »

Yes it isn't enter to callback
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Problems with os-less

Post by Giovanni »

Stop the program and see where it is stuck. If you need advice then provide info.

Giovanni
aduss95
Posts: 3
Joined: Mon Aug 13, 2018 11:32 am

Re: Problems with os-less

Post 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
Post Reply