cancel
Showing results for 
Search instead for 
Did you mean: 

Transfer data from PC to device on Sensortile STEVAL-STLKT01V1?

Prateek Karkare
Associate
Posted on March 06, 2017 at 06:18

Hi,

I am completely new to the embedded world and have just started to use STM sensortile. I apologize for the naivety of this question in advance.

I want to transfer data from PC to the sensortile which has an STM32L476 on it. I am trying to get my head through the USB CDC interface and data transfer. The software package has a datalog example which sends the data from device to PC via CDC_Fill_Buffer function. I want to send data from PC (Using MATLAB or python via com port) to the device. Any help/tutorial/example code would be of great help regarding this.

Thanks 

#sensortile #stm32l476 #usb-cdc #transfer-data-using-usb
2 REPLIES 2
Davide G
ST Employee
Posted on May 09, 2017 at 12:35

Hi,

You should just implement the 'CDC_Itf_Receive(uint8_t* Buf, uint32_t *Len)' callback in usbd_cdc_interface.c. This function is called by the USB driver each time new data is received.

You could also download the latest STM32CubeL4 

http://www.st.com/en/embedded-software/stm32cubel4.html

 

and have a look at the CDC example: STM32Cube_FW_L4_V1.8.0\Projects\STM32L476G_EVAL\Applications\USB_Device\CDC_Standalone

DavidH
Associate

Hello Davide,

I have a related question, how to send data to the SensorTile via the BLE using BlueSTSDK Python?

Thanks in advance!