Part Number: ADS1192
Tool/software: TI C/C++ Compiler
Hi!
I try to test the spi interface between ads1192 and MCU!!
Transmission for register writing from MCU to ADS1192 observed and confirmed DIN with an oscilloscope.
Register reading command confirmed transmission by oscilloscope, but I am sending data.
Why on earth?
so firstly i sent 2 bytes commands to ads1192 from mcu, they are:
uint8_t SPIReadReg(uint8_t addr)
{
uint8_t temp[3]; //Din opcode
uint8_t temp_rec[3] = {0}; //Dout data
temp[0] = addr | 0x21;
temp[1] = 0x00; //register num
nrf_gpio_pin_clear(22); //CS pin low
spi_send_recv(temp,temp_rec,2);
//APP_ERROR_CHECK(nrf_drv_spi_transfer(&spi, temp, 2, NULL, NULL));
while(m_transfer_completed == false)
{
m_transfer_completed = false;
nrf_delay_us(10);
nrf_gpio_pin_set(22); //CS high
}
nrf_delay_us(10);
return temp_rec[2];
}
main.c
SPIReadReg(0x02);
Attach the image when sending the RREG command.
please teach me the solution!!