TIM_TimeBaseStructure hangi header in icinde

Başlatan Yuunus, 28 Şubat 2017, 23:13:52

Yuunus

stm32f10x_tim.h bunun icinde aradim yok hal library indirdim onun icinde de bulamadim, yerinin bilen varsa ilgili header in linkini verebilir mi?

baran123

TIM_TimeBaseInitTypeDef structure'ı stm32f10x_tim.h içinde tanımlı.
Dikkatli bakın.

Yuunus

@baran123 yapinin prescaler ine erismek istiyorum
TIM_TimeBaseStructure.TIM_Prescaler = 0; gibi
ama benim header da yapi asagidaki gibi tanimli

typedef struct
{
  uint16_t TIM_Prescaler;         /*!< Specifies the prescaler value used to divide the TIM clock.
                                       This parameter can be a number between 0x0000 and 0xFFFF */

  uint16_t TIM_CounterMode;       /*!< Specifies the counter mode.
                                       This parameter can be a value of @ref TIM_Counter_Mode */

  uint16_t TIM_Period;            /*!< Specifies the period value to be loaded into the active
                                       Auto-Reload Register at the next update event.
                                       This parameter must be a number between 0x0000 and 0xFFFF.  */ 

  uint16_t TIM_ClockDivision;     /*!< Specifies the clock division.
                                      This parameter can be a value of @ref TIM_Clock_Division_CKD */

  uint8_t TIM_RepetitionCounter;  /*!< Specifies the repetition counter value. Each time the RCR downcounter
                                       reaches zero, an update event is generated and counting restarts
                                       from the RCR value (N).
                                       This means in PWM mode that (N+1) corresponds to:
                                          - the number of PWM periods in edge-aligned mode
                                          - the number of half PWM period in center-aligned mode
                                       This parameter must be a number between 0x00 and 0xFF. 
                                       @note This parameter is valid only for TIM1 and TIM8. */
} TIM_TimeBaseInitTypeDef;

yani benim aradigim yapi elemani bunun icin de yok

skara1214

direk TIMx->PSC diye erişşen olmuyormu?
Herkes ölür ama herkes gerçekten yaşamaz

Yuunus

#4
olur niye olmasin da yorucu oluyor, bir o degilki bir alay kod var hem adamlar registera yapi ile erisilir hale getirmisler kastirmanin alemi yok diye dusundum, hem surekli hangi registera hangi degerin atanacagini akilda tutmak zor oluyor, kritik durumlarda registera gidiyorum.


Hallettim arkadaslar sagolun;