| Electronic Components Datasheet Search |
|
UM0324 Datasheet(PDF) 42 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0324 Datasheet(HTML) 42 Page - STMicroelectronics |
|
42 / 105 page ![]() Library functions UM0324 42/105 Furthermore, you have the possibility to add any A/D conversions required for your application (hereafter referred to as general purpose conversions). This section describes how this is achieved. First of all, the SVPWM_3ShuntInit function performs the synchronization between PWM and TIM0 peripherals (Figure 21 shows the two peripheral counters when REP_RATE = 1), then, the A/D converter peripheral is configured so that it is triggered by the TIM0 OC2 signal. Figure 21. PWM and TIM0 synchronization (REP_RATE=1) This way, when the value of the TIM0 counter matches the value contained in the OCR2 register, the first A/D conversion for current sampling is started. Meanwhile, a DMA transaction reloads the TIM0 OCR2 register with the value corresponding to the delay required for the second current sampling conversion. Moreover, the end of this first A/D conversion triggers another DMA transaction which sets the next channel to be converted in the ADC register CLR2. At the end of the second conversion, the three-phase load current has been updated and the IFOC algorithm can then be executed in the A/D End of Conversion Interrupt Service Routine (EOC ISR). In this routine, the A/D converter is also reconfigured so that it can perform the general purpose chain of conversions while the CPU executes the IFOC algorithm. The entire process is illustrated in Figure 22. After execution of the IFOC algorithm, the A/D converter is configured to perform the next PWM period three-phase current sensing (delays and channels). This allows to reduce the CPU load (lower number of ADC ISR) and limits to 6 (@ 7.5 MHz ADC peripheral clock) the number of general purpose A/D conversions that can be performed in each PWM period. To specify the general purpose conversions to be performed, you can select the first channel and the number of channels to be converted by editing the GP_CONVERSIONS_FIRST_CHANNEL and GP_CONVERSIONS_NUMBER parameters respectively in the MC_pwm_3shunt_prm.h header file. |
|
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 |