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?
Problems with os-less
- 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:
- 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
Stop the program and see where it is stuck. If you need advice then provide info.
Giovanni
Giovanni
Re: Problems with os-less
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
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
Who is online
Users browsing this forum: No registered users and 27 guests