| Moteur de recherche de fiches techniques de composants électroniques |
|
AN2618 Fiches technique(PDF) 21 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2618 Fiches technique(HTML) 21 Page - STMicroelectronics |
|
21 / 23 page ![]() AN2618 Code example 7.etpu_pwm.c 21/23 } if (duty > 0xFFFFFF) { errorCode = PARAM_OUT_RANGE; duty = 0xFFFFFF; } // passing function parameter to eTPU function frame *(pba_32 + ETPU_PWM_PERIOD_OFFSET) = period; *(pba_32 + ETPU_PWM_DUTY_OFFSET) = duty; //write hsr ETPU.CHAN[channel].HSRR.R = ETPU_PWM_UPDATE; return (errorCode); } /******************************************************************************** * FUNCTION : etpu_pwm_getPulseTime * * PURPOSE: This function executes on the host CPU. * * This function is an application API to read the time stamp of the * * begining of the last peroid of the PWM output on the ePTU channel. * ********************************************************************************/ int16_t etpu_pwm_getPulseTime(uint8_t channel, uint32_t * startTime) { int16_t errorCode = 0; uint32_t functFrame = ETPU.CHAN[channel].CR.B.CPBA; uint32_t *pba_32 = &DATA_RAM + (functFrame << 1) + ETPU_PSE_RAM_OFFSET; // passing function parameter to eTPU function frame *startTime = *(pba_32 + ETPU_PWM_PULSE_TIME_OFFSET); return (errorCode); } |
|
|
Lien URL |
| ALLDATASHEET vous a-t-il été utile ? [ DONATE ] |
À propos de Alldatasheet | Publicité | Contactez-nous | Politique de confidentialité | Lien vers la fiche technique | Echange de liens | Fabricants 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 |