Skip to main content
Prateek Karkare
Visitor II
March 6, 2017
Question

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

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
This topic has been closed for replies.

2 replies

ST Employee
May 9, 2017
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
October 12, 2018

Hello Davide,

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

Thanks in advance!