Forum : ARM
Post Information | Post |
---|---|
February 18, 2009 - 12:56pm
|
Hi, void SysTickHandler(void) In project settings/LD linker/Libraries "ST" library is set to "No" to make sure that program uses project's own interrupt-handler. In Application Options/Directories/Library Directories currently include the library from ride7 (C:\Program Files\Raisonance\Ride\Lib\ARM) and I have modified C:\Program Files\Raisonance\Ride\Lib\ARM\STM32F10x_LIB\library\src\stm3210x_it.c to include the interrupt above. In main.c the systick is enabled as following: /* SysTick end of count event each 1ms with input clock equal to 9MHz (HCLK/8, default) */ /* Enable the SysTick Counter */ Thanks for any help. |
Hi
The new gcc version 4.3.2 might be the reason explaining why you do not have the same behaviour.
This compiler has higher optimization process so your variable TickCounter might have been optimized.
To avoid such issues it is better to declare it as volatile if you need to use it this way.
If trying this does not help, please try to make a small project which shows this issue and sentd it to me
so it would be easier for us to find where is the problem.
Regards,
Matloub
Hi,
Thank you for your answer!
I tried to set the variable as volatile but it had no effect. I reproduced the issue with a test project and sent it to you via E-mail. Then I found a CD with older versions 7.02.0001 and 1.04.0001 and installing these solved the issue, so there seems to be a problem in the project/it's settings and the newer compiler.
Hi
Discussing by email with TR we had solve the issue:
There is a mistake in startup file which places systick at a wrong place in vector table.
The workaround is to modify the crt0_stm32x_HD.c file (c:\program files\raisonance\ride\lib\arm\),
Please note that you need to compile it and place the output in: c:\program files\raisonance\ride\lib\arm
The problem is corrected and won't appear on next release.
Modification:
Change this
To
Regards,
Matloub