Question on current sensor sampling
As far as i know ( from my limited information ) I motor drives the current sampling happens at each switching cycle . ( they call it cycle-by-cycle current limit) , you need to read the current at each PWM cycle.

Usually it is done by making the PWM module trigger a ADC sampling at the beginning of the switching cycle of the IGBT/Mosfet , then the sampling time is ended automatically by the end of the On time for example ( this depends weather you are measuring peak or average current) ,this sample then is converted and compared to the allowed current and then do whatever you want ( for example decrease PWM output or cause a fault signal ... etc )