input capture timer

Created at 2021-02-21 22:47:37

Hi guys
i need to use "Capture timer" in rt-thread.
i'm use in bare metal (without RTOS) of below code for two channel in one timer:

my configure in CubeMX:
image_2021-02-21_181717.png

void HAL_TIM_IC_CaptureCallback (TIM_HandleTypeDef *htim)
{
        if(htim->Channel==HAL_TIM_ACTIVE_CHANNEL_1)
        {
        // code for channel 1
        }
        else if(htim->Channel==HAL_TIM_ACTIVE_CHANNEL_2)
        {
        //code for cahnnel 2 
        }

and i have enable "RT- Input capture " in component but i don't know what to do next?:
image_2021-02-21_232225.png

thanks for responsived

@RTThread_IoT_OS

更多

Follower
0
Views
1.3k
2 Answers
来一颗糖
来一颗糖 2021-02-22

This components TAB only adds our driver framework to it.the actual underlying driver implementation is in the Hardware TAB.

image.png

If not, then you need to implement the underlying driver yourself.

来一颗糖
来一颗糖 2021-02-22

Write Your Answer

Log in to publish your answer,Click here to log in.

Create
Post

Share