Hello!I am configuating the double sample and double update in every FOC period by using etpu module,and i set the pwmm_config structure as FS_ETPU_PWMM_FM1_FRAME_AND_CENTER_UPDATE to realize the two updating position. Beyone that,i also set the as_config_t structure of etpu module to FS_ETPU_AS_FM1_CENTER_PULSE_ON to realize the two triggle time, After that i captured the picture of the oscilloscope about the AS signal and the PWMH signal of V phase of the motor control,and compared them before and after the above setting,however i did not found the correct result,i also attached the two pictures to show that. Please help me to find how to configure the etpu correctly.thanks!
Hi,
If you want to implement double sample, please trying the following AS configuration. Focus on the black bold section below
struct as_config_t as_config =
{
0, /* start_offset */
0, /* period */
USEC2TCR1(5), /* pulse_width */
FS_ETPU_AS_FM0_FRAME_PULSE_ON | FS_ETPU_AS_FM1_CENTER_PULSE_ON, /* pulse_selection */
0, /* pulse_adjustment_frame */
USEC2TCR1(5), /* pulse_adjustment_center */
FS_ETPU_AS_IRQ_FRAME_PULSE_START, /* irq_dma_options */
FS_ETPU_AS_LINK_FRAME_PULSE_END, /* link_options */
0, /* link_chans_frame_start */
...
...
};