I try now for nearly 1 week to understand how to define in arduino IDE the HAL to define the sample time for the ADC.
For a science experiment, I need to log some sample in 10ms. I was first try to use the arduino Nano. Working fine and I could also get high number of samples when changing the prescaler. But the Nano has some limitation like 10 instead of 12Bit and the more important, only 2kbyte sram. So I was thinking to store more sample in the timeframe with the STM32 (blue pill). But analogRead() is in the default configuration to slow. Was then checking the o-scope project, but this is not building in the arduino IDE with the offical core. Was then checking the other cores, but also every time was getting other build issues.
If I try to set the register, they keep empty.
Code: Select all
ADC_SMPR1(ADC_SAMPLETIME_1CYCLE_5,ADC_CHANNEL_0);
But also here the build is failing. Complain that "HAL_ADC_MspInit" is multiple times defined.
So I'm confused and can't find any good documentation about this topic. So can someone help here?
Thanks.