接上一篇帖子返回出厂程序 - 意法半导体AMG SensorTile开发大赛 - 电子工程世界-论坛
https://bbs.eeworld.com.cn/thread-521170-1-1.html
今天才发现sensorsTile套件的专业名字叫STSW-STLKT01,使用mbed编程卡的要死,索性翻译下官方文档,给大家做点贡献
固件包包含如下3程序
[img]file:///D:\Documents\Tencent Files\3455482668\Image\Group\D5Q]Z%[FDRM{)T]0EOA8P23.png[/img][img=0,1]file:///D:\Documents\Tencent Files\3455482668\Image\Group\D5Q]Z%[FDRM{)T]0EOA8P23.png[/img]
DataLog通过usb将传感器数据发送到虚拟串口或者存到SD中
AudioLoop将音频信号通过IIS传送至DAC芯片,用户可以播放声音通过喇叭或者耳机
BLE_SampleApp是一个关于低功耗蓝牙配置的例子,使sensors将环境传感器数据上传至APP
固件包包含器件驱动、板级支持包和一些例程
DataLog有两种运行模式,可通过main.c中的SendOverUSB变量值配置
- SendOverUSB=1 sensor raw data streaming via USB (Virtual COM Port class)
- SendOverUSB=0 sensor raw data storage on SD card. After reset, the firmware performs the following actions:
配置 HAL和时钟.
- Configures LED1 (USB mode only)
- Configures the Real Time Clock (RTC)
- Initializes the USB peripheral or the SPI for SD Card access
- Initializes and enables all the sensors The main loop is executed every DATA_PERIOD_MS milliseconds (default=100ms)
- Reads the timestamp from RTC and writes it to the USB or SDCard
- Reads each one of the configured sensors and writes the data to the USB or SDCard If SDCard card mode has been selected, the user must activate the DataLog with double tap on the board. When the first double tap is detected the application starts logging data to file (SensorTile_Log_N000.tsv), another double tap will stop the acquisition. The user can now repeat the operations and restart the data logging on another file (SensorTile_Log_N001.tsv)(这个很关键,意思是:SD模式下,双击核心板会保存数据,第一次双击开始数据记录,文件名SensorTile_Log_N000.tsv,话说.tsv什么格式?可以用EXCEL打开?第二次双击停止,再次双击会将数据记录到另一个文件SensorTile_Log_N001.tsv)
AudioLoop
话说SAI和IIS是一回事吗?
该程序复位后,
- Configures HAL and clocks
- Configures LED1
- Configure STM32 Serial Audio Interface peripheral (SAI) in I2S mode and the external DAC-配置STM32的串口音频外设接口(SAI)在I2S模式和外部DAC
- Configure the digital filter peripheral (DFSDM) for microphone acquisition
- BSP_AUDIO_IN_ClockConfig function (defined weak in the BSP) is redefined as an empty function in main.c because the clock and PLLs configuration is already performed in BSP_AUDIO_OUT_Init function.
- Starts the Audio acquisition The main loop is empty in this application, because all the operations needed to copy the audio stream acquired from the microphone to the Serial Audio Interface are executed in the DFSDM interrupt. For this reason the function [url="]AudioProcess()[/url] is called by the two callbacks [url="]BSP_AUDIO_IN_TransferComplete_CallBack()[/url] and [url="]BSP_AUDIO_IN_HalfTransfer_CallBack()[/url].
BLE_SampleApp
After reset the firmware performs the following actions:
- Configure HAL and clocks
- Configure and disable sensors Chip Select pins
- Initilize the target platform:
- USB peripheral (for debugging)
- LED1
- Environmental sensors
- Initialize Bluetooth Low Energy stack
- Initialize Bluetooth Low Energy services
- Initialize timers
- Main Loop:
- Led management
- BLE events management
- Environmental sensors data mangement
很重要一点
These applications must be flashed at address 0x08004000 and they works only if the BootLoader is loaded at the beginning of the FLASH (address 0x08000000).
[img]file:///D:\Documents\Tencent Files\3455482668\Image\Group\D5Q]Z%[FDRM{)T]0EOA8P23.png[/img]
最后提醒如下最后两个文件是出厂程序
本帖最后由 suoma 于 2017-2-27 23:20 编辑