cancel
Showing results for 
Search instead for 
Did you mean: 

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 mx

VV.29
Associate

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;

}

1 REPLY 1
KnarfB
Principal III