I want to implement a lock-in detection on stm32f373cct6 that means that I need to trig the DMA of the DAC and the DMA of the SDADC with the same timer.I am using CubeMx to confugure the stm32f373cct6.I want to trig the DMA of the injected SDADC1 wit...
I am trying that : sprintf((char*)buffer,"%d\r",HAL_ADC_GetValue(&hadc));CDC_Transmit_FS(buffer,8);but the speed is only 3 or 4kS/sSomeone has something better ?
Posted on September 02, 2017 at 12:01When I want to output un sinewave which the points are included in the exc[z] array it is way slower if I use a timer interrupt :while(1) { HAL_GPIO_TogglePin(GPIOB,GPIO_PIN_0); / / 7 µS to send one ...
Thanks very much Bob for your patience.I will try to implement DMA, I understood that DMA doesn't use CPU, so during sampling ADC with DMA, CPU can send data over USB, it is a kind of parallel task !However it is not easy to find example on the inter...
last question though : OK I managed to get 1MS/s, it is obviously quicker, but, but, but...When I was using my first code (the slow one), I took one sample then I sent it by USB. There was no "missing" point on the signal, I mean there was no "hole" ...
I am almost done. I have around 1MS/s with this code : while (1)
{
for (int i=0;i<512;i++)
{
while ((ADC1->ISR & ADC_ISR_EOC) != ADC_ISR_EOC){}
uint16_t val=ADC1->DR;
ADC_buffer[2*i] = val >> 8; // MSB
ADC_bu...
@KIC8462852 EPIC204278916Your last message leave me a very perplexed.look at my last messages, now the code you gave seems to me wrong especially this line : CDC_Transmit_FS(buffer,8);should be remplaced by this line :CDC_Transmit_FS(buffer,2);becau...