Data acquisition from STM32f407 to MATLAB

I am getting data from a current sensor through the adc of stm32f407. I want to export that data to MATLAB at real time or at least at sampling frequency of 10 kHz. I tried STM TrueStudio but its sampling rate is only 1 kHz. So please let me know what should I do to get data?