This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS1292: ads1292 can not get data ?

Part Number: ADS1292


the follow is reg:

  • Hi Yanchen!

    Can you provide any more detail? Are you connected to our ADS1292EVM-PDK or do you have your own hardware? Can you share a schematic or screen shots from your setup?

  • the problem  :

     Sometimes data can be obtained and sometimes data can not be obtained.

  •        uint8_t retvalue=0;
    	uint8_t index=0;
    	nrf_gpio_cfg_output(SPI1_CONFIG_SS_PIN);
    	nrf_gpio_cfg_output(ECG_START_PIN);
    	nrf_gpio_cfg_output(ECG_PWDN_PIN);
    	ret_code_t err_code;	
    	nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_HITOLO(true);
    	in_config.pull = NRF_GPIO_PIN_PULLUP;
           err_code = nrf_drv_gpiote_in_init(ECG_ADC_RDY_INT, &in_config, read_pin_pin_handler);
           APP_ERROR_CHECK(err_code);
    	nrf_drv_gpiote_in_event_enable(ECG_ADC_RDY_INT, true);
    	ADS1292_START_LOW;
    	ads1292r_reset(adapter);
    	ADS1292_START_LOW;
    	nrf_delay_ms(100);
    	ads1292r_read_data_stop_continue(adapter);	
    	nrf_delay_ms(10);
    	while(1)
    	{
    		retvalue=ads1292r_get_id(adapter);
    		SEGGER_RTT_printf(0,"retvalue=%02x\n",retvalue);
    		if(retvalue==ADS1292_ID || retvalue==ADS1292R_ID)
    		{
    			break;
    		}
    		nrf_delay_ms(10);
    		if(index>200)
    		{
    			return ADS_ERR;
    		}
    		index++;
    	}
    	if(retvalue==ADS1292R_ID)
    	{
    		adapter->device_id=ADS1292R_ID;
    		SEGGER_RTT_printf(0,"select ads1292r\n");
    		ads1292r_set_refrence_buff(adapter,ADS1292R_REFRENCE_BUFF_ENABLE);
    		ads1292r_set_refrence_vol(adapter,ADS1292R_REFRENCE_VOL_2420);
    		ads1292r_set_lead_off_comparator(adapter,ADS1292R_LEAD_OFF_COMPARATOR_DISANLE);
    		nrf_delay_ms(10);
    		
    		ads1292r_set_internal_clk_connect(adapter,ADS1292R_INTERNAL_CLK_CONNECT_DISABLE);
    		ads1292r_test_signal_en( adapter,ADS1292R_TEST_SIGNAL_OFF);
    	//	ads1292r_test_signal_frq( adapter,ADS1292R_TEST_SIGNAL_SQZ1);
    		
    		//assign config1
    		ads1292r_set_mode(adapter,ADS1292R_CONTINUE_MODE);
    		ads1292r_set_sample_rate(adapter,ADS1292R_SAMPLE_RATE_500);    
    		//0X03
    		ads1292r_set_lead_off_comp_th(adapter,ADS1292R_LEAD_OFF_COMP_TH_70);
    		ads1292r_set_lead_off_current(adapter,ADS1292R_LEAD_OFF_CUR_06_NA);
    		ads1292r_set_lead_off_frq(adapter,ADS1292R_LEAD_OFF_DC);
    		//0x04/05
    		ads1292r_set_channel1_pwdn( adapter, ADS1292R_NOMAL_OPERATION);
    		ads1292r_set_channel2_pwdn( adapter,ADS1292R_NOMAL_OPERATION);
    		ads1292r_channel1_pag( adapter,ADS1292R_PAG_12);
    		ads1292r_channel2_pag( adapter,ADS1292R_PAG_12);
    		ads1292r_set_channel1_input_select( adapter,ADS1292R_NOMAL_INPUT);
    		ads1292r_set_channel2_input_select( adapter,ADS1292R_NOMAL_INPUT);
    		//0x06
    		ads1292r_set_chop_frq(adapter,ADS1292R_CHOP_FRQ_16);
    		ads1292r_set_rld_buff(adapter,ADS1292R_ENABLE);
    		ads1292r_set_rld_lead_off_sense( adapter,ADS1292R_DISABLE);
    		ads1292r_set_rld_connect_channel1_positive(adapter,ADS1292R_ENABLE);
    		ads1292r_set_rld_connect_channel2_positive(adapter,ADS1292R_ENABLE);
    		ads1292r_set_rld_connect_channel1_negative(adapter,ADS1292R_ENABLE);
    		ads1292r_set_rld_connect_channel2_negative(adapter,ADS1292R_ENABLE);
    		//0x07
    		ads1292r_set_loff_dir_current_sel_channel2(adapter,ADS1292R_DISABLE);
    		ads1292r_set_loff_dir_current_sel_channel1(adapter,ADS1292R_DISABLE);
    		ads1292r_set_channel2_loff_detection_neg_input(adapter,ADS1292R_ENABLE);
    		ads1292r_set_channel2_loff_detection_pos_input(adapter,ADS1292R_ENABLE);
    		ads1292r_set_channel1_loff_detection_neg_input(adapter,ADS1292R_ENABLE);
    		ads1292r_set_channel1_loff_detection_pos_input(adapter,ADS1292R_ENABLE);
    		//0x08
    		ads1292r_set_modultor_clk_div(adapter,ADS1292R_CLK_DIV_4);	
    		//resp
    		//0x09
    		ads1292r_set_resp_demod(adapter,ADS1292R_RESP_DEMOD_ON);
    		ads1292r_set_resp_mod(adapter,ADS1292R_RESP_MOD_ON);
    		//ADS1292R_RESP_PHASE
    		ads1292r_set_resp_phase(adapter,ADS1292R_RESP_PHASE_112_5);
    		//ADS1292R_RESP_CLK_MODE
    		ads1292r_set_resp_clk_mode(adapter,ADS1292R_RESP_CLK_INTERNAL);
    		//0x0a
    		ads1292r_set_resp_calib(adapter,ADS1292R_RESP_CALIB_OFF);
    		ads1292r_set_resp_frq(adapter,ADS1292R_RESP_FREQ_32);	
    	}
    	else if(retvalue==ADS1292_ID)
    	{
    		adapter->device_id=ADS1292_ID;
    		SEGGER_RTT_printf(0,"select ads1292\n");
    		ads1292r_set_refrence_buff(adapter,ADS1292R_REFRENCE_BUFF_ENABLE);
    		ads1292r_set_refrence_vol(adapter,ADS1292R_REFRENCE_VOL_2420);
    		ads1292r_set_lead_off_comparator(adapter,ADS1292R_LEAD_OFF_COMPARATOR_DISANLE);
    		nrf_delay_ms(10);
    		ads1292r_set_internal_clk_connect(adapter,ADS1292R_INTERNAL_CLK_CONNECT_DISABLE);
    		ads1292r_test_signal_en( adapter,ADS1292R_TEST_SIGNAL_OFF);
    	//ads1292r_test_signal_frq( adapter,ADS1292R_TEST_SIGNAL_SQZ1);
    		
    		//assign config1
    		ads1292r_set_mode(adapter,ADS1292R_CONTINUE_MODE);
    		ads1292r_set_sample_rate(adapter,ADS1292R_SAMPLE_RATE_500);    
    		//0X03
    		ads1292r_set_lead_off_comp_th(adapter,ADS1292R_LEAD_OFF_COMP_TH_70);
    		ads1292r_set_lead_off_current(adapter,ADS1292R_LEAD_OFF_CUR_06_NA);
    		ads1292r_set_lead_off_frq(adapter,ADS1292R_LEAD_OFF_DC);
    		//0x04/05
    		ads1292r_set_channel1_pwdn( adapter, ADS1292R_POWER_DOWN);
    		ads1292r_set_channel2_pwdn( adapter,ADS1292R_NOMAL_OPERATION);
    		ads1292r_channel1_pag( adapter,ADS1292R_PAG_6);
    		ads1292r_channel2_pag( adapter,ADS1292R_PAG_12);
    		ads1292r_set_channel1_input_select( adapter,ADS1292R_INPUT_SHORT);
    		ads1292r_set_channel2_input_select( adapter,ADS1292R_NOMAL_INPUT);
    		//0x06
    		ads1292r_set_chop_frq(adapter,ADS1292R_CHOP_FRQ_16);
    		ads1292r_set_rld_buff(adapter,ADS1292R_ENABLE);
    		ads1292r_set_rld_lead_off_sense( adapter,ADS1292R_DISABLE);
    		ads1292r_set_rld_connect_channel1_positive(adapter,ADS1292R_ENABLE);
    		ads1292r_set_rld_connect_channel2_positive(adapter,ADS1292R_ENABLE);
    		ads1292r_set_rld_connect_channel1_negative(adapter,ADS1292R_ENABLE);
    		ads1292r_set_rld_connect_channel2_negative(adapter,ADS1292R_ENABLE);
    		//0x07
    		ads1292r_set_loff_dir_current_sel_channel2(adapter,ADS1292R_DISABLE);
    		ads1292r_set_loff_dir_current_sel_channel1(adapter,ADS1292R_DISABLE);
    		ads1292r_set_channel2_loff_detection_neg_input(adapter,ADS1292R_ENABLE);
    		ads1292r_set_channel2_loff_detection_pos_input(adapter,ADS1292R_ENABLE);
    		ads1292r_set_channel1_loff_detection_neg_input(adapter,ADS1292R_ENABLE);
    		ads1292r_set_channel1_loff_detection_pos_input(adapter,ADS1292R_ENABLE);
    		//0x08
    		ads1292r_set_modultor_clk_div(adapter,ADS1292R_CLK_DIV_4);	
    		//resp
    		//0x09
    		ads1292r_set_resp_demod( adapter,ADS1292R_RESP_DEMOD_OFF);
    		ads1292r_set_resp_mod( adapter,ADS1292R_RESP_MOD_OFF);
    		//ADS1292R_RESP_PHASE
    		ads1292r_set_resp_phase( adapter,ADS1292R_RESP_PHASE_0);
    		//ADS1292R_RESP_CLK_MODE
    		ads1292r_set_resp_clk_mode( adapter,ADS1292R_RESP_CLK_INTERNAL);
    //		//0x0a
    //		ads1292r_set_resp_calib(adapter,ADS1292R_RESP_CALIB_OFF);
    		ads1292r_set_resp_frq( adapter,ADS1292R_RESP_FREQ_64);	
    		ads1292r_wake_up(adapter);
    		for(uint8_t i=0;i<0x0c;i++)
    		{
    			SEGGER_RTT_printf(0,"tem[%d]=%02x\n",i,ads1292r_read_reg(adapter,i));
    		}
    	}
    	else
    	{
    		return ADS_ERR ;
    	}
    	ADS1292_START_HIGH; 
    	if(adapter->mode==0) ads1292r_read_data_start_continue(adapter);
    	nrf_delay_ms(1000);
    	ads1292_adapter=adapter;
    
    	return ADS_SUC;

  • the another problem:No interrupt can be triggered for ready pin
  • Hi Yancheng,

    Are both R1 and R2 installed on your PCB? Could you be resetting or in power down? Screen captures of your communication lines would be helpful as well.

**Attention** This is a public forum