You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Fotis Panagiotopoulos <f....@gmail.com> on 2023/06/06 21:43:47 UTC

Systick tickless on STM32F4

Hello,

I just noticed the option STM32_TICKLESS_SYSTICK for the STM32.
However, it seems that it does nothing.

After a source code search, this option is not used anywhere.
There is no tickless implementation that supports the systick timer.

Shall I remove this?

Re: Systick tickless on STM32F4

Posted by Gregory Nutt <sp...@gmail.com>.
On 6/6/2023 4:47 PM, Gregory Nutt wrote:
>
>
> On 6/6/2023 4:31 PM, Nathan Hartman wrote:
>> On Tue, Jun 6, 2023 at 5:44 PM Fotis Panagiotopoulos
>> <f....@gmail.com>  wrote:
>>> Hello,
>>>
>>> I just noticed the option STM32_TICKLESS_SYSTICK for the STM32.
>>> However, it seems that it does nothing.
>>>
>>> After a source code search, this option is not used anywhere.
>>> There is no tickless implementation that supports the systick timer.
>>>
>>> Shall I remove this?
>> Are there other STM32 sub-families that do support Tickless? Perhaps
>> it makes sense to port the support for that to this STM32 sub-family?
>>
>> Cheers,
>> Nathan
>
> Since Systick is common to all ARMv7-M architectures (except for some 
> clock source differences), you would think this should be common 
> across all ARMv7-M
>
> ARMv6-M supports SYSTICK as well.
>
> It looks there are the same junk definitions elsewhere but the feature 
> is not implemented anywhere.
>
>     $ grep -r SYSTICK * | grep TICKLESS
>     arm/src/gd32f4/Kconfig: depends on !GD32F4_TICKLESS_SYSTICK
>     arm/src/stm32/Kconfig:config STM32_TICKLESS_SYSTICK
>     arm/src/stm32/Kconfig:  depends on !STM32_TICKLESS_SYSTICK
>     arm/src/stm32wb/Kconfig:        depends on !STM32WB_TICKLESS_SYSTICK
>
> Due to the limited range of the SYSTICK counter, SYSTICK is probably 
> not really the optimal choice for a SYSTICK timer.  I am not sure if 
> it is really worth the effort to implement.

It looks like the systick tickless support was added by :

    commit a13ebe5975db7abb048e2a68b60a656e09640ffb
    Author: Huang Qi <hu...@xiaomi.com>
    Date:   Sat Jun 20 11:54:51 2020 +0800

         arch/arm/stm32: Make SysTick as a Tickless clock source option

         Signed-off-by: Huang Qi <hu...@xiaomi.com>

I don't know the status of this.


Re: Systick tickless on STM32F4

Posted by Gregory Nutt <sp...@gmail.com>.
On 6/6/2023 4:31 PM, Nathan Hartman wrote:
> On Tue, Jun 6, 2023 at 5:44 PM Fotis Panagiotopoulos
> <f....@gmail.com>  wrote:
>> Hello,
>>
>> I just noticed the option STM32_TICKLESS_SYSTICK for the STM32.
>> However, it seems that it does nothing.
>>
>> After a source code search, this option is not used anywhere.
>> There is no tickless implementation that supports the systick timer.
>>
>> Shall I remove this?
> Are there other STM32 sub-families that do support Tickless? Perhaps
> it makes sense to port the support for that to this STM32 sub-family?
>
> Cheers,
> Nathan

Since Systick is common to all ARMv7-M architectures (except for some 
clock source differences), you would think this should be common across 
all ARMv7-M

ARMv6-M supports SYSTICK as well.

It looks there are the same junk definitions elsewhere but the feature 
is not implemented anywhere.

    $ grep -r SYSTICK * | grep TICKLESS
    arm/src/gd32f4/Kconfig: depends on !GD32F4_TICKLESS_SYSTICK
    arm/src/stm32/Kconfig:config STM32_TICKLESS_SYSTICK
    arm/src/stm32/Kconfig:  depends on !STM32_TICKLESS_SYSTICK
    arm/src/stm32wb/Kconfig:        depends on !STM32WB_TICKLESS_SYSTICK

Due to the limited range of the SYSTICK counter, SYSTICK is probably not 
really the optimal choice for a SYSTICK timer.  I am not sure if it is 
really worth the effort to implement.

Re: Systick tickless on STM32F4

Posted by Nathan Hartman <ha...@gmail.com>.
On Tue, Jun 6, 2023 at 5:44 PM Fotis Panagiotopoulos
<f....@gmail.com> wrote:
>
> Hello,
>
> I just noticed the option STM32_TICKLESS_SYSTICK for the STM32.
> However, it seems that it does nothing.
>
> After a source code search, this option is not used anywhere.
> There is no tickless implementation that supports the systick timer.
>
> Shall I remove this?

Are there other STM32 sub-families that do support Tickless? Perhaps
it makes sense to port the support for that to this STM32 sub-family?

Cheers,
Nathan

Re: Systick tickless on STM32F4

Posted by Gregory Nutt <sp...@gmail.com>.
On 6/6/2023 4:46 PM, Alan C. Assis wrote:
> Hi Fotis,
>
> On 6/6/23, Fotis Panagiotopoulos <f....@gmail.com> wrote:
>> Hello,
>>
>> I just noticed the option STM32_TICKLESS_SYSTICK for the STM32.
>> However, it seems that it does nothing.
>>
>> After a source code search, this option is not used anywhere.
>> There is no tickless implementation that supports the systick timer.
>>
>> Shall I remove this?
>>
> It was introduced by this commit:
>
> $ git show a13ebe5975d
>
> I think someone removed STM32_TICKLESS_SYSTICK and replaced it with
> CONFIG_STM32_TICKLESS_TIMER but forgot to update the Kconfig.
>
> BR,
>
> Alan

The configuration CONFIG_STM32_TICKLESS_TIMER is not referenced in C 
code either.

The tickless support for STM32 does not appear to support the SYSTICK timer.


Re: Systick tickless on STM32F4

Posted by "Alan C. Assis" <ac...@gmail.com>.
Hi Fotis,

On 6/6/23, Fotis Panagiotopoulos <f....@gmail.com> wrote:
> Hello,
>
> I just noticed the option STM32_TICKLESS_SYSTICK for the STM32.
> However, it seems that it does nothing.
>
> After a source code search, this option is not used anywhere.
> There is no tickless implementation that supports the systick timer.
>
> Shall I remove this?
>

It was introduced by this commit:

$ git show a13ebe5975d

I think someone removed STM32_TICKLESS_SYSTICK and replaced it with
CONFIG_STM32_TICKLESS_TIMER but forgot to update the Kconfig.

BR,

Alan