| Electronic Components Datasheet Search |
|
AN2776 Datasheet(PDF) 11 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2776 Datasheet(HTML) 11 Page - STMicroelectronics |
|
11 / 20 page ![]() AN2776 FWLib V1.0 to V2.0 migration steps 11/20 TIM_ICInitStructure.TIM_ICSelection = TIM_ICSelection_DirectTI; TIM_ICInitStructure.TIM_ICPrescaler = TIM_ICPSC_DIV1; TIM_ICInitStructure.TIM_ICFilter = 0x0; TIM_ICInit(TIM3, &TIM_ICInitStructure); TIM_SelectInputTrigger(TIM3, TIM_TS_TI1FP1); TIM_SelectSlaveMode(TIM3, TIM_SlaveMode_Reset); /* TIM enable counter */ TIM_Cmd(TIM3, ENABLE); In FWLib V2.0, the TIM_ICMode member of the TIM_ICInitTypeDef structure was removed: TIM_ICInitStructure.TIM_Channel = TIM_Channel_1; TIM_ICInitStructure.TIM_ICPolarity = TIM_ICPolarity_Rising; TIM_ICInitStructure.TIM_ICSelection = TIM_ICSelection_DirectTI; TIM_ICInitStructure.TIM_ICPrescaler = TIM_ICPSC_DIV1; TIM_ICInitStructure.TIM_ICFilter = 0x0; TIM_ICInit(TIM3, &TIM_ICInitStructure); TIM_SelectInputTrigger(TIM3, TIM_TS_TI1FP1); TIM_SelectSlaveMode(TIM3, TIM_SlaveMode_Reset); /* TIM enable counter */ TIM_Cmd(TIM3, ENABLE); PWM input capture configuration Typical code for TIM PWM input capture configuration based on FWLib V1.0: TIM_ICInitStructure.TIM_ICMode = TIM_ICMode_PWMI; TIM_ICInitStructure.TIM_Channel = TIM_Channel_1; TIM_ICInitStructure.TIM_ICPolarity = TIM_ICPolarity_Rising; TIM_ICInitStructure.TIM_ICSelection = TIM_ICSelection_DirectTI; TIM_ICInitStructure.TIM_ICPrescaler = TIM_ICPSC_DIV1; TIM_ICInitStructure.TIM_ICFilter = 0x0; TIM_ICInit(TIM2, &TIM_ICInitStructure); TIM_SelectInputTrigger(TIM2, TIM_TS_TI1FP1); TIM_SelectSlaveMode(TIM2, TIM_SlaveMode_Reset); In FWLib V2.0, the TIM_ICMode member of the TIM_ICInitTypeDef structure was removed and a new function, TIM_PWMIConfig, was added: TIM_ICInitStructure.TIM_Channel = TIM_Channel_1; TIM_ICInitStructure.TIM_ICPolarity = TIM_ICPolarity_Rising; TIM_ICInitStructure.TIM_ICSelection = TIM_ICSelection_DirectTI; TIM_ICInitStructure.TIM_ICPrescaler = TIM_ICPSC_DIV1; TIM_ICInitStructure.TIM_ICFilter = 0x0; TIM_PWMIConfig(TIM2, &TIM_ICInitStructure); TIM_SelectInputTrigger(TIM2, TIM_TS_TI1FP1); TIM_SelectSlaveMode(TIM2, TIM_SlaveMode_Reset); 2.2.3 SPI In FWLib V1.0, the stm32f10x_spi.c/stm32f10x_spi.h driver is used to cover the functionality of the SPI1 and SPI2 peripherals. The function format in this driver is as follows: SPI_FunctionName(SPIx, param1, param2,...) e.g.: SPI_ITConfig(SPI_TypeDef* SPIx, u8 SPI_IT, FunctionalState NewState) In FWLib V2.0, this driver was updated to support the new SPI3 peripheral and the I2S protocol. In high-density devices, the SPI2 and SPI3 interfaces give the flexibility to use either the SPI protocol or the I2S audio protocol. These two protocols share some configuration bits plus a dedicated bit for each protocol. The following sections describes the update made on this driver. |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |