Hi,
My Environment details:
Chibios - 2.6.4
Hardware - STM32F4 Discovery Board
Toolchain - Rowley Crossworks
OS - Windows 8
I am using the STM32F4 discovery board chibios demo, after calling chThdSleepMilliseconds() function processor never returns and when I debug it stops at
_Idle_Thread() function.
There are no exceptions code just runs fine but chThdSleepMilliseconds() doesnt return after the specified timeout period.
Your help is appreciated.
Thanks
chThdSleepMilliseconds doesnt return
Moderator: RoccoMarco
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: chThdSleepMilliseconds doesnt return
hi,
The only cause for what you are experiencing is the CPU not serving interrupts. This could be related to your toolchain.
Could you give a try to ChibiStudio? just to rule out a possible problem.
Unzip it under C:\ and it is ready: http://sourceforge.net/projects/chibios ... ibiStudio/
Giovanni
The only cause for what you are experiencing is the CPU not serving interrupts. This could be related to your toolchain.
Could you give a try to ChibiStudio? just to rule out a possible problem.
Unzip it under C:\ and it is ready: http://sourceforge.net/projects/chibios ... ibiStudio/
Giovanni
Re: chThdSleepMilliseconds doesnt return
Hi,
I will try chibistudio, in the meantime I tried with Keil it works fine.
I added ISR routine for systick in crossworks and ISR is getting called without issues.
I will try chibistudio, in the meantime I tried with Keil it works fine.
I added ISR routine for systick in crossworks and ISR is getting called without issues.
Re: chThdSleepMilliseconds doesnt return
Hello!
I had the same problem while I use stlink gdb server.
I've solved this problem by using openOCD.
Pavel
I had the same problem while I use stlink gdb server.
I've solved this problem by using openOCD.
Pavel
-
alexlesuper
- Posts: 10
- Joined: Tue Oct 15, 2013 3:52 pm
Re: chThdSleepMilliseconds doesnt return
I am getting the same problem using ChibiOS and Rowley Crossworks. My program goes to sleep and waits for an interrupt except it never happens. The same program in Keil runs fine.
Does anyone have an idea of how this is happening?
Does anyone have an idea of how this is happening?
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: chThdSleepMilliseconds doesnt return
Sorry no idea, it could be some hidden initialization performed by the Rowley library/compiler preventing the system tick interrupt.
I imagine you are using the GCC port, the answer must be in differences between the Rowley compiler and a "normal" GCC.
Giovanni
I imagine you are using the GCC port, the answer must be in differences between the Rowley compiler and a "normal" GCC.
Giovanni
Re: chThdSleepMilliseconds doesnt return
Hi all,
i have found the same issue on stm32f3discovery, i use last stable from 2.6.x git branch.
my toolchain is https://launchpad.net/gcc-arm-embedded
in project settings i have set softfp and fpv4-sp-d16 options.
earlier i used own toolchain built with ct-ng, and did not have this issue.
i will try to build new toolchain and test again.
Thanks
i have found the same issue on stm32f3discovery, i use last stable from 2.6.x git branch.
my toolchain is https://launchpad.net/gcc-arm-embedded
in project settings i have set softfp and fpv4-sp-d16 options.
earlier i used own toolchain built with ct-ng, and did not have this issue.
i will try to build new toolchain and test again.
Thanks
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: chThdSleepMilliseconds doesnt return
I assume you are not using the provided makefiles, correct?
Giovanni
Giovanni
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: chThdSleepMilliseconds doesnt return
Are you using the provided linker scripts and startup files? if not then probably the problem is there.
Note, most projects contain Eclipse project files (.project, .cproject) that use the Makefile, much more efficient that normal CDT projects.
Giovanni
Note, most projects contain Eclipse project files (.project, .cproject) that use the Makefile, much more efficient that normal CDT projects.
Giovanni