2024-02-12 03:12 AM - last edited on 2024-06-28 01:28 AM by SimonePradolini
Hi, im using the FP-SNS-DATALOG1 firmware for measuring sensor data and another custom firmware for other ML tasks. Furthermore, i am implementing a bootloader to switch between both softwares.
I want to measure automaticaly and in order to do so i need to trigger the sampling via software (not with pushing the USR button). How can i implement that? I compiled the Project file from your github repository and i would now try to create a new binary (.elf) to use as firmware on my evaluation board. Is there an easier/quicker way?
2024-02-12 07:52 AM
Hello @TomRett
I'm not sure I got the question: are you missing the .elf file when compiling the CubeIDE project? Once compiled, .elf and .bin are available in Debug folder generated by CubeIDE at compile time.
Best regards
Simone
2024-02-14 01:12 PM
Hello @SimonePradolini, i have the binary file so that is not the question. Nonetheless, i want to use the application's code to measure with just the IMP23ABSU microphone automatically instead of pressing the USR button as in the usual case. Looking into the imp23absu_app.c, i see a few potential functions that could work in my favour (IMP23ABSU_Start, IMP23ABSU_StartAcquisition). However, i see that in the main.c that after starting scheduler the system "ignores" the code below (or at least it doesnt reach there under specific conditions)
How can i trigger the measurement automatically and save the data to the SD card? I want to let the IMP23ABSU microphone to sample for 5 seconds after which i will invoke NVIC_SystemReset(); to jump back to my bootloader.
Thanks in advance!
Tom
2024-02-15 01:01 AM
Hello @TomRett
DATALOG1 also features the Automode, which can be initiated automatically at device power-up or reset. This mode can be used to start the datalog operations or to pause all the executions for a specific period of time by putting the sensor node in "idle" phase. See the User Manual for the full description.
You can exploit this feature and modify the Automode and AutoModeTask files for your purposes.
Best regards
Simone
2024-02-15 02:26 AM
Im trying this now. Why am i not getting any printf results on the COM port? Do i have to enable something before? I cant see where i would be abble to add my system reset inside Automode.c. This file seems to only read the execution_config.json.
2024-02-15 04:39 AM
Furthermore, after i switch from the bootloader address to the flash address of HSDatalog, the firmware doesnt start auto acquisition. The address start address (0x08019000) in the linker is set correctly and the offset fir VTOR (0x19000) aswell. Am i missing something important here?
2024-02-16 02:12 AM
Can someone tell me how to start the FP-SNS-DATALOG1 software **without** pressing the RESET button?
2024-02-16 04:57 AM
Hello @TomRett
DATALOG1 is not meant to handle natively your requirements. We can give you some hints and you are free to modify the code for your purposes, but then we can't offer a one-to-one support for customization.
In reply to all your requests:
Best regards
Simone
2024-02-16 12:02 PM
#define HSD_PRINTF_DEBUG 1
#if HSD_PRINTF_DEBUG
/**
* User can change here printf with a custom implementation.
* For example:
* #define HSD_PRINTF(...) MY_PRINTF(__VA_ARGS__)
*/
#include <stdio.h>
#define HSD_PRINTF(...) printf(__VA_ARGS__)
I have viewed the UM2688 multiple times where i found that:
That is why im asking about "RESET". How can i reset the HSDatalog firmware, as suggested by the documentation, in order to correctly run measurements? I think that the reason for my stuck osKernelStart() is due to the missing reset (or am i totally wrong?).
The HSDatalog source code used is the latest version from the Github repository. Im using FP-SNS-DATALOG1.