Skip to main content
VV.29
Associate
March 12, 2022
Question

using stm32h747. I am reading ADC data using SPI on ADS8661 IC. the sampling rate we are able to read at is 14us using FOR loop(PFA). trying to reduce the sampling rate by DMA receive through tim12 trigger, not working, please guide me how to in cube

  • March 12, 2022
  • 1 reply
  • 785 views

for(int i=0;i<3000;i++)

{

//__HAL_TIM_SET_COUNTER(&htim4,0);

while(!(GPIOI->IDR &(1<<5))); //monitoring RVS Pin

GPIOI->ODR &= ~(1<<0); // CS pin Low

HAL_SPI_Receive(&hspi2, data_rcv ,2,1); // reading 2 bytes at a time

GPIOI->ODR |= 1<<0; //CS pin high

temp[temp_cnt]=((data_rcv[0]<<8)|data_rcv[1])>>4;

temp_cnt=temp_cnt+1;

// counterCount=TIM4->CNT;

}

This topic has been closed for replies.

1 reply

KnarfB
Super User
March 12, 2022