Problems with os-less

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

Problems with os-less

Postby aduss95 » Thu Aug 16, 2018 12:29 pm

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: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Problems with os-less

Postby Giovanni » Thu Aug 16, 2018 1:24 pm

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

Postby aduss95 » Thu Aug 16, 2018 1:41 pm

Yes it isn't enter to callback

User avatar
Giovanni
Site Admin
Posts: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Problems with os-less

Postby Giovanni » Thu Aug 16, 2018 1:45 pm

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

Postby aduss95 » Thu Aug 16, 2018 2:36 pm

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


Return to “ChibiOS/HAL”

Who is online

Users browsing this forum: No registered users and 27 guests