Other Parts Discussed in Thread: ADS8689
Hello,
My name is Rameez, I'm trying to write and read into the registers of ADS8675 through STM32 using HAL lib.
HAL_GPIO_WritePin(GPIOA, CS_Pin, GPIO_PIN_SET); /////// turn CS off HAL_Delay(10); HAL_GPIO_WritePin(GPIOA, CS_Pin, GPIO_PIN_RESET); /////// turn CS on spiData[0]=0xD0; spiData[1]=0x04; spiData[2]=0x00; spiData[3]=0x10; HAL_SPI_Transmit(&hspi1,spiData,4,50); HAL_GPIO_WritePin(GPIOA, CS_Pin, GPIO_PIN_SET); /////// turn CS off HAL_GPIO_WritePin(GPIOA, CS_Pin, GPIO_PIN_RESET); /////// turn CS on spiData2[0]=0x48; spiData2[1]=0x04; spiData[2]=0x00; spiData[3]=0x00; HAL_SPI_Transmit(&hspi1,spiData2,4,50); HAL_Delay(1000); HAL_SPI_Receive(&hspi1,rx_buff,4,50); HAL_GPIO_WritePin(GPIOA, CS_Pin, GPIO_PIN_SET); /////// turn CS off
I'm using above code to write and read into reg, but I'm unable to read the written values for the register.