2015-11-25 03:46 PM
Můžete zadat text �?i webovou adresu nebo
https://translate.google.cz/?tr=f&hl=cs
.https://translate.google.cz/?tr=t&hl=cs
</div>Zobrazuje se překlad pro text
Přeložit raději text
If
I understand
correctly, the function
HAL_TIM_PWM_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length) Start PWM and over DMA transfer data from pData to CCR1 register of Timer. If I''m true and CCR1 is 16bit register why is pData pointer onuint32_t
? How use it with for example uint16_t Buffer[1000];?2015-11-26 09:10 AM
Himark.aster,
If you have a look to the definition of the register CC1 under stm32f1*.h, you will find that it is declared of type uint32_t__IO uint32_t CCR1; /*!< TIM capture/compare register 1, Address offset: 0x34 */
The fact that CCR1 is a 16 bit register is not contradictory with declaring it as uint32_t . The goal is to keep the code homogeneous.
By consequence, if you want to use an uint16_t buffer, you must change all related variables and parameters in the HAL library, which is not obvious.
-Shahrzad-
2015-11-26 12:50 PM
Thank you for answer
.