You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Sangam Thapa <sa...@outlook.com> on 2024/06/10 08:01:53 UTC

Fw: Problem initializing hardware timer in stm32 board

________________________________
From: Sangam Thapa <sa...@outlook.com>
Sent: Monday, June 10, 2024 1:44 PM
To: dev-thread.12345@nuttx.apache.org <de...@nuttx.apache.org>
Subject: Problem initializing hardware timer in stm32 board

I'm writing to seek assistance with a hardfault error I'm encountering while working on hardware timers for the STM32F427AI board. There seems to be a limited amount of resources available specifically for hardware timers, although I found some information related to PWM.
The Problem:
I'm using the stm32_timer_initialize function (example: stm32_timer_initialize("/dev/timer7", 7)) to initialize the timer driver. However, when I run the provided basic timer application, a hardfault occurs at line 256 of the timer.h file. This line seems to be the root cause of the error.
What I've Tried:

  *   I've verified that the timer driver is initialized correctly with the appropriate device name and timer number for the board.
  *   I've reviewed the timer configuration to ensure it aligns with my application's requirements (clock source, prescaler, count mode).
  *   I've searched online forums and communities for similar issues but haven't found any relevant solutions.

Request for Assistance:
If anyone has encountered and resolved similar hardfault errors related to hardware timers on the STM32F427AI, your insights would be greatly appreciated. Any suggestions or resources regarding hardware timer configuration for this board would be extremely helpful.
Additional Information (Optional):

  *   If possible, I can share more details about the specific timer configuration and the code snippet around line 256 of timer.h.

Thank you for your time and support.[cid:d9cc45b1-e29d-4aad-b260-57dc0ed59097]


Re: Fw: Problem initializing hardware timer in stm32 board

Posted by Sangam Thapa <sa...@outlook.com>.
[https://lh7-us.googleusercontent.com/slidesz/AGV_vUeS7zUb5l_b9WYtCQ8dmtfGTHBcs5MvKH57OR1rBD58YF4zUmX9lHU0fyoNvSuQ-C3eSPUssCQXpo6xyMptPaZlEnWRpVLGOBnAFZd3to8LGtFqN7-adask9Igywu_iBEk_URdcuw669IQQJ0RDIXsCoamMT7iu=s2048?key=loYIKWk6sr8yX47EbvYTqA]Here is screenshot of call stack. Please have a look.
________________________________
From: Xiang Xiao <xi...@gmail.com>
Sent: Tuesday, June 11, 2024 6:31 PM
To: dev@nuttx.apache.org <de...@nuttx.apache.org>
Subject: Re: Fw: Problem initializing hardware timer in stm32 board

Sangam, could you try this patch: https://github.com/apache/nuttx/pull/12484?

On Tue, Jun 11, 2024 at 12:20 PM Xiang Xiao <xi...@gmail.com>> wrote:
Could you share the call stack when the assert happens?

On Mon, Jun 10, 2024 at 4:02 PM Sangam Thapa <sa...@outlook.com>> wrote:

________________________________
From: Sangam Thapa <sa...@outlook.com>>
Sent: Monday, June 10, 2024 1:44 PM
To: dev-thread.12345@nuttx.apache.org<ma...@nuttx.apache.org> <de...@nuttx.apache.org>>
Subject: Problem initializing hardware timer in stm32 board

I'm writing to seek assistance with a hardfault error I'm encountering while working on hardware timers for the STM32F427AI board. There seems to be a limited amount of resources available specifically for hardware timers, although I found some information related to PWM.
The Problem:
I'm using the stm32_timer_initialize function (example: stm32_timer_initialize("/dev/timer7", 7)) to initialize the timer driver. However, when I run the provided basic timer application, a hardfault occurs at line 256 of the timer.h file. This line seems to be the root cause of the error.
What I've Tried:

  *   I've verified that the timer driver is initialized correctly with the appropriate device name and timer number for the board.
  *   I've reviewed the timer configuration to ensure it aligns with my application's requirements (clock source, prescaler, count mode).
  *   I've searched online forums and communities for similar issues but haven't found any relevant solutions.

Request for Assistance:
If anyone has encountered and resolved similar hardfault errors related to hardware timers on the STM32F427AI, your insights would be greatly appreciated. Any suggestions or resources regarding hardware timer configuration for this board would be extremely helpful.
Additional Information (Optional):

  *   If possible, I can share more details about the specific timer configuration and the code snippet around line 256 of timer.h.

Thank you for your time and support.[cid:ii_19005865fd8cb971f161]


Re: Fw: Problem initializing hardware timer in stm32 board

Posted by Xiang Xiao <xi...@gmail.com>.
Sangam, could you try this patch: https://github.com/apache/nuttx/pull/12484
?

On Tue, Jun 11, 2024 at 12:20 PM Xiang Xiao <xi...@gmail.com>
wrote:

> Could you share the call stack when the assert happens?
>
> On Mon, Jun 10, 2024 at 4:02 PM Sangam Thapa <sa...@outlook.com>
> wrote:
>
>>
>> ------------------------------
>> *From:* Sangam Thapa <sa...@outlook.com>
>> *Sent:* Monday, June 10, 2024 1:44 PM
>> *To:* dev-thread.12345@nuttx.apache.org <
>> dev-thread.12345@nuttx.apache.org>
>> *Subject:* Problem initializing hardware timer in stm32 board
>>
>> I'm writing to seek assistance with a hardfault error I'm encountering
>> while working on hardware timers for the STM32F427AI board. There seems to
>> be a limited amount of resources available specifically for hardware
>> timers, although I found some information related to PWM.
>> *The Problem:*
>> I'm using the stm32_timer_initialize function (example: stm32_timer_initialize("/dev/timer7",
>> 7)) to initialize the timer driver. However, when I run the provided
>> basic timer application, a hardfault occurs at line 256 of the timer.h file. This
>> line seems to be the root cause of the error.
>> *What I've Tried:*
>>
>>    - I've verified that the timer driver is initialized correctly with
>>    the appropriate device name and timer number for the board.
>>    - I've reviewed the timer configuration to ensure it aligns with my
>>    application's requirements (clock source, prescaler, count mode).
>>    - I've searched online forums and communities for similar issues but
>>    haven't found any relevant solutions.
>>
>> *Request for Assistance:*
>> If anyone has encountered and resolved similar hardfault errors related
>> to hardware timers on the STM32F427AI, your insights would be greatly
>> appreciated. Any suggestions or resources regarding hardware timer
>> configuration for this board would be extremely helpful.
>> *Additional Information (Optional):*
>>
>>    - If possible, I can share more details about the specific timer
>>    configuration and the code snippet around line 256 of timer.h.
>>
>>
>> Thank you for your time and support.
>>
>>

Re: Fw: Problem initializing hardware timer in stm32 board

Posted by Xiang Xiao <xi...@gmail.com>.
Could you share the call stack when the assert happens?

On Mon, Jun 10, 2024 at 4:02 PM Sangam Thapa <sa...@outlook.com>
wrote:

>
> ------------------------------
> *From:* Sangam Thapa <sa...@outlook.com>
> *Sent:* Monday, June 10, 2024 1:44 PM
> *To:* dev-thread.12345@nuttx.apache.org <dev-thread.12345@nuttx.apache.org
> >
> *Subject:* Problem initializing hardware timer in stm32 board
>
> I'm writing to seek assistance with a hardfault error I'm encountering
> while working on hardware timers for the STM32F427AI board. There seems to
> be a limited amount of resources available specifically for hardware
> timers, although I found some information related to PWM.
> *The Problem:*
> I'm using the stm32_timer_initialize function (example: stm32_timer_initialize("/dev/timer7",
> 7)) to initialize the timer driver. However, when I run the provided
> basic timer application, a hardfault occurs at line 256 of the timer.h file. This
> line seems to be the root cause of the error.
> *What I've Tried:*
>
>    - I've verified that the timer driver is initialized correctly with
>    the appropriate device name and timer number for the board.
>    - I've reviewed the timer configuration to ensure it aligns with my
>    application's requirements (clock source, prescaler, count mode).
>    - I've searched online forums and communities for similar issues but
>    haven't found any relevant solutions.
>
> *Request for Assistance:*
> If anyone has encountered and resolved similar hardfault errors related to
> hardware timers on the STM32F427AI, your insights would be greatly
> appreciated. Any suggestions or resources regarding hardware timer
> configuration for this board would be extremely helpful.
> *Additional Information (Optional):*
>
>    - If possible, I can share more details about the specific timer
>    configuration and the code snippet around line 256 of timer.h.
>
>
> Thank you for your time and support.
>
>