AFE4960PEVM: AFE2 of AFE4960P is not working

Part Number: AFE4960PEVM
Other Parts Discussed in Thread: AFE4960P, , AFE4960EVM, MSP430F5528, AFE4960

Tool/software:

Hi, I am using AFE4960PEVM and related biosensing software to visualize Lead 1 configuration ECG waveform. The wave forms are created using a simulator. I followed the instructions as per "Design Example – 5-Lead ECG Pg 249" from the AFE4960P datasheet. Both the plots/channels of AFE2 shows only noise in the graph. While AFE1 graph shows appropriate wave form as per configuration. I suspect AFE2 isn't working as I could see the wave form of lead 1 if I configure the AFE1 registers to process the LA and RA electrodes. I am using the stock py script provided by the bio sensing software and verified the values as per the "Design Example – 5-Lead ECG Pg 249". What else should I do to, in order to make the AFE2 work?

  • Hi Aswath,

    Thank you for your post. Have you made any hardware modifications to the EVM, or is everything left as default? Can you share a hi-res image showing your electrode and simulator connections? And just to confirm, you are using this script below?:

    Regards,

    Ryan

  • Hi Ryan,

    1. We have not made any modifications to the EVM board.

    2. Attached the picture in this link: https://workdrive.zoho.com/file/ud1fgfb8c7ff00feb492bb9688888919818d2

    3. I am using the DUAL_AFE_3ECG_1RESP script from the bio sensing GUI. (picture below).

  • Hello Aswatch - I cannot access the picture in the link you shared. Can you please attach the image directly to the post?

    Yes, that is the same python script which I mentioned. I will review this again this afternoon.

    Regards,

    Ryan

  • Thanks for the confirmation Ryan. Can you try this?

    I couldn't attach the image in any other way.

  • HI Aswath,

    The site you linked is blocked by our IT department. I cannot access it. Can you save the image as a PNG or JPEG and attach it?

    Regards,

    Ryan

  • I hope this image is clearer. I couldn't attach the original image, had to compress for the reply box accepts the image. Just in case if you find the image has poor quality. Please check the following sites:
    1. gdrive

    2. Onedrive

  • Thank you, Aswath. This image is perfectly fine. We will review and provide feedback shortly.

    Regards,

    Ryan

  • Hello Aswath,

    Thank you for your patience as yesterday was a US holiday. 

    Can you please try shorting jumpers J7 and J8, both in the [1-2] position (note the pins of each jumper are in opposite order)? This will route the clock of AFE1 to AFE2 such they operate synchronously.

    Regards,

    Ryan

  • Hi Ryan, 

    I have tried the same. But couldn't get any waveforms from afe2.
    Attached the image for reference.

    I hope, the jumpers are in right configuration.

  • Hello Aswath,

    Yes, the jumpers are in the correct setting.

    The issue appears to be our fault as the "P" version of the AFE4960-DESIGN folder is missing binary to load the dual-AFE version of the EVM firmware. It is also missing the preliminary draft User Guide which is specifically intended for dual-AFE operation of the AFE4960EVM. My sincere apologies for the oversight and confusion. Can you please request access to the "non-P" version of the AFE4960-DESIGN resources? Both the firmware and UG for dual-AFE operation should have been included in the AFE4960P-DESIGN resources as well. I will submit to add them ASAP.

    In addition, the electrodes are used in a different order when operating the EVM in dual-AFE mode. Please switch the placement of V1 and LL per the dual-AFE UG image below:

    I checked the default script again for dual-AFE, 3-ECG and 1-RESP and it is working fine on my setup. Below I've attached a copy of my script with comments which should clarify how the electrodes are expected to be configured.

    Note: AFE1_ECG_CH1 is measuring "V1-RA", but the "Lead V1" output actually requires some post-processing to be accurate. The correct measurement is V1-WCT, where WCT = (RA+LA+LL)/3. Therefore, in the application firmware, you must take AFE1_ECG_CH1 and subtract [(Lead I + Lead II) / 3], which is arithmetically equivalent.

    You can derive Lead III in a similar manner by subtracting Lead I from Lead II in post processing.

    2235.DUAL_AFE_3ECG_1RESP.py
    """Hard reset AFE4960 on both EVM"""
    reset_AFE_GUI()
    
    """AFE1 Lead construction"""
    AFE1.component.segment.AFE4960.AFE4960_global.SW_ECG_INP_ECG				= 2		#ECG3 = V1, ECG CH1 = Lead V1
    AFE1.component.segment.AFE4960.AFE4960_global.SW_ECG_INM_ECG				= 8		#ECG2 = RA
    AFE1.component.segment.AFE4960.AFE4960_global.SW_BIOZ_RXP					= 5		#ECG1 = LA, RESP CH1 = Lead I
    AFE1.component.segment.AFE4960.AFE4960_global.SW_BIOZ_RXM					= 6		#ECG2 = RA
    AFE1.component.segment.AFE4960.AFE4960_global.SW_BIOZ_TXP					= 1		#RESP1 = LA
    AFE1.component.segment.AFE4960.AFE4960_global.SW_BIOZ_TXM					= 2		#RESP2 = RA
    AFE1.component.segment.AFE4960.AFE4960_global.SW_RLD						= 1		#ECG4 = RLD
    
    """AFE2 Lead construction"""
    AFE2.component.segment.AFE4960.AFE4960_global.SW_ECG_INP_ECG				= 2		#ECG3 = LL, ECG CH1 = Lead II
    AFE2.component.segment.AFE4960.AFE4960_global.SW_ECG_INM_ECG				= 8		#ECG2 = RA
    AFE2.component.segment.AFE4960.AFE4960_global.SW_BIOZ_RXP					= 5		#ECG1 = LA, ECG CH2 = Lead I
    AFE2.component.segment.AFE4960.AFE4960_global.SW_BIOZ_RXM					= 6		#ECG2 = RA
    AFE2.component.segment.AFE4960.AFE4960_global.SW_BIOZ_TXP					= 0
    AFE2.component.segment.AFE4960.AFE4960_global.SW_BIOZ_TXM					= 0
    AFE2.component.segment.AFE4960.AFE4960_global.SW_RLD						= 0
    
    """AFE1 Signal Acquisition configuration"""
    AFE1.component.segment.AFE4960.AFE4960_global.COUNT_RAC						= 96
    AFE1.component.segment.AFE4960.AFE4960_global.REG_NUM_TS					= 1
    AFE1.component.segment.AFE4960.AFE4960_global.REG_NUM_ESAW					= 0
    AFE1.component.segment.AFE4960.AFE4960_global.REG_NUM_BSAW					= 0
    AFE1.component.segment.AFE4960.AFE4960_global.CONFIG_TS0					= 1
    AFE1.component.segment.AFE4960.AFE4960_global.CONFIG_TS1					= 3
    
    """AFE2 Signal Acquisition configuration"""
    AFE2.component.segment.AFE4960.AFE4960_global.COUNT_RAC						= 96
    AFE2.component.segment.AFE4960.AFE4960_global.REG_NUM_TS					= 1
    AFE2.component.segment.AFE4960.AFE4960_global.REG_NUM_ESAW					= 0
    AFE2.component.segment.AFE4960.AFE4960_global.REG_NUM_BSAW					= 0
    AFE2.component.segment.AFE4960.AFE4960_global.CONFIG_TS0					= 1
    AFE2.component.segment.AFE4960.AFE4960_global.CONFIG_TS1					= 3
    
    """AFE1 Signal chain configuration"""
    AFE1.component.segment.AFE4960.AFE4960_global.ECG_INA_GAIN					= 1
    AFE1.component.segment.AFE4960.AFE4960_global.EN_DEC_ECG					= 1
    AFE1.component.segment.AFE4960.AFE4960_global.ECG_DEC_FACTOR				= 0
    AFE1.component.segment.AFE4960.AFE4960_global.BIOZ_PHI_STEP					= 174763
    AFE1.component.segment.AFE4960.AFE4960_global.BIOZ_EXC_SQUARE 				= 1
    AFE1.component.segment.AFE4960.AFE4960_global.BIOZ_RE 						= 8
    AFE1.component.segment.AFE4960.AFE4960_global.BIOZ_CE						= 0
    AFE1.component.segment.AFE4960.AFE4960_global.SHORT_RINT_BIOZ				= 1
    AFE1.component.segment.AFE4960.AFE4960_global.ATTN_BIOZ_TX					= 0
    AFE1.component.segment.AFE4960.AFE4960_global.EN_ECG2						= 0
    AFE1.component.segment.AFE4960.AFE4960_global.SEL_IN_BIOZ_RX				= 0
    AFE1.component.segment.AFE4960.AFE4960_global.RECONFIGURE_BIOZ_LPF 			= 0
    AFE1.component.segment.AFE4960.AFE4960_global.EN_RLD_LOOP_ECG2				= 0
    AFE1.component.segment.AFE4960.AFE4960_global.BIOZ_LPF_BW					= 2
    AFE1.component.segment.AFE4960.AFE4960_global.SEL_CHPF1_BIOZ				= 0
    AFE1.component.segment.AFE4960.AFE4960_global.SEL_RHPF1_BIOZ				= 2
    AFE1.component.segment.AFE4960.AFE4960_global.BIOZ_INA_GAIN					= 3
    AFE1.component.segment.AFE4960.AFE4960_global.PROCESS_BSAW					= 0
    AFE1.component.segment.AFE4960.AFE4960_global.EN_DEC_BIOZ					= 1
    AFE1.component.segment.AFE4960.AFE4960_global.BIOZ_DEC_FACTOR				= 4
    AFE1.component.segment.AFE4960.AFE4960_global.ACQ_MODE_SEL					= 74
    AFE1.component.segment.AFE4960.AFE4960_global.EN_ECG_RX						= 1
    AFE1.component.segment.AFE4960.AFE4960_global.PDN_ECG_INA					= 0
    AFE1.component.segment.AFE4960.AFE4960_global.PDN_ECG_RLD					= 0
    AFE1.component.segment.AFE4960.AFE4960_global.PDN_ADC						= 0
    AFE1.component.segment.AFE4960.AFE4960_global.PDN_OSCH						= 0
    AFE1.component.segment.AFE4960.AFE4960_global.PDN_ILEAD						= 0
    AFE1.component.segment.AFE4960.AFE4960_global.EN_BIOZ_RX					= 1
    AFE1.component.segment.AFE4960.AFE4960_global.EN_BIOZ_TX					= 1
    AFE1.component.segment.AFE4960.AFE4960_global.DIS_ACTIVE_BIOZ_TX			= 0
    AFE1.component.segment.AFE4960.AFE4960_global.DIS_BUF_PDN_ON_ADC			= 1
    AFE1.component.segment.AFE4960.AFE4960_global.DIS_PD_REFSYS					= 1
    AFE1.component.segment.AFE4960.AFE4960_global.DIS_PD_VCM					= 1
    AFE1.component.segment.AFE4960.AFE4960_global.PDNAFE						= 0
    AFE1.component.segment.AFE4960.AFE4960_global.PDN_BG_IN_DEEP_SLEEP			= 0
    AFE1.component.segment.AFE4960.AFE4960_global.DIS_CHOP_INA1					= 0
    AFE1.component.segment.AFE4960.AFE4960_global.DIS_CHOP_INA2					= 0
    AFE1.component.segment.AFE4960.AFE4960_global.TIMER_ENABLE					= 1
    AFE1.component.segment.AFE4960.AFE4960_global.RAC_COUNTER_ENABLE			= 1
    AFE1.component.segment.AFE4960.AFE4960_global.FIFO_EN						= 1
    AFE1.component.segment.AFE4960.AFE4960_global.REG_WM_FIFO					= 0 
    
    
    """AFE2 Signal chain configuration"""
    AFE2.component.segment.AFE4960.AFE4960_global.ECG_INA_GAIN					= 1
    AFE2.component.segment.AFE4960.AFE4960_global.EN_DEC_ECG					= 1
    AFE2.component.segment.AFE4960.AFE4960_global.ECG_DEC_FACTOR				= 0
    AFE2.component.segment.AFE4960.AFE4960_global.EN_ECG2						= 1
    AFE2.component.segment.AFE4960.AFE4960_global.SEL_IN_BIOZ_RX				= 1
    AFE2.component.segment.AFE4960.AFE4960_global.RECONFIGURE_BIOZ_LPF 			= 1
    AFE2.component.segment.AFE4960.AFE4960_global.EN_RLD_LOOP_ECG2				= 0
    AFE2.component.segment.AFE4960.AFE4960_global.BIOZ_LPF_BW					= 2
    AFE2.component.segment.AFE4960.AFE4960_global.SEL_CHPF1_BIOZ				= 0
    AFE2.component.segment.AFE4960.AFE4960_global.SEL_RHPF1_BIOZ				= 2
    AFE2.component.segment.AFE4960.AFE4960_global.BIOZ_INA_GAIN					= 0
    AFE2.component.segment.AFE4960.AFE4960_global.PROCESS_BSAW					= 3
    AFE2.component.segment.AFE4960.AFE4960_global.EN_DEC_BIOZ					= 1
    AFE2.component.segment.AFE4960.AFE4960_global.BIOZ_DEC_FACTOR				= 0
    AFE2.component.segment.AFE4960.AFE4960_global.ACQ_MODE_SEL					= 74
    AFE2.component.segment.AFE4960.AFE4960_global.EN_ECG_RX						= 1
    AFE2.component.segment.AFE4960.AFE4960_global.PDN_ECG_INA					= 0
    AFE2.component.segment.AFE4960.AFE4960_global.PDN_ECG_RLD					= 0
    AFE2.component.segment.AFE4960.AFE4960_global.PDN_ADC						= 0
    AFE2.component.segment.AFE4960.AFE4960_global.PDN_OSCH						= 0
    AFE2.component.segment.AFE4960.AFE4960_global.PDN_ILEAD						= 0
    AFE2.component.segment.AFE4960.AFE4960_global.EN_BIOZ_RX					= 1
    AFE2.component.segment.AFE4960.AFE4960_global.EN_BIOZ_TX					= 1
    AFE2.component.segment.AFE4960.AFE4960_global.DIS_ACTIVE_BIOZ_TX			= 1
    AFE2.component.segment.AFE4960.AFE4960_global.DIS_BUF_PDN_ON_ADC			= 1
    AFE2.component.segment.AFE4960.AFE4960_global.DIS_PD_REFSYS					= 1
    AFE2.component.segment.AFE4960.AFE4960_global.DIS_PD_VCM					= 1
    AFE2.component.segment.AFE4960.AFE4960_global.PDNAFE						= 0
    AFE2.component.segment.AFE4960.AFE4960_global.PDN_BG_IN_DEEP_SLEEP			= 0
    AFE2.component.segment.AFE4960.AFE4960_global.DIS_CHOP_INA1					= 0
    AFE2.component.segment.AFE4960.AFE4960_global.DIS_CHOP_INA2					= 0
    AFE2.component.segment.AFE4960.AFE4960_global.TIMER_ENABLE					= 1
    AFE2.component.segment.AFE4960.AFE4960_global.RAC_COUNTER_ENABLE			= 1
    AFE2.component.segment.AFE4960.AFE4960_global.FIFO_EN						= 1
    AFE2.component.segment.AFE4960.AFE4960_global.REG_WM_FIFO					= 0 
    
    """AFE1 Pace pulse detect configuration"""
    AFE1.component.segment.AFE4960.AFE4960_global.EN_PACE						= 1
    AFE1.component.segment.AFE4960.AFE4960_global.PACE_SET_HIGH_2				= 1
    AFE1.component.segment.AFE4960.AFE4960_global.PACE_SET_HIGH_1				= 1
    AFE1.component.segment.AFE4960.AFE4960_global.PACE_SET_HIGH_0				= 1
    AFE1.component.segment.AFE4960.AFE4960_global.PACE_CONFIG_REG1 				= 995684
    AFE1.component.segment.AFE4960.AFE4960_global.PACE_CONFIG_REG2				= 1048256
    AFE1.component.segment.AFE4960.AFE4960_global.PACE_DIS_RESP_REJECT			= 0
    AFE1.component.segment.AFE4960.AFE4960_global.SEL_CLK_PACE					= 0
    AFE1.component.segment.AFE4960.AFE4960_global.WIDTH_PACE_MIN				= 4
    AFE1.component.segment.AFE4960.AFE4960_global.WIDTH_PACE_MAX				= 135
    AFE1.component.segment.AFE4960.AFE4960_global.PACE_OBS_EXTEND				= 1
    AFE1.component.segment.AFE4960.AFE4960_global.PACE_VALID_COMPLETE			= 1
    AFE1.component.segment.AFE4960.AFE4960_global.PACE_REF1_H					= 2
    AFE1.component.segment.AFE4960.AFE4960_global.PACE_REF1_L					= 2
    AFE1.component.segment.AFE4960.AFE4960_global.PACE_FIFO_DATA_CTRL			= 0
    AFE1.component.segment.AFE4960.AFE4960_global.EN_PACE_WINDOW_ADC_RDY		= 0
    AFE1.component.segment.AFE4960.AFE4960_global.EN_PACE_WINDOW_GPIO2			= 0
    AFE1.component.segment.AFE4960.AFE4960_global.EN_PACE_VALID_TAG				= 1
    AFE1.component.segment.AFE4960.AFE4960_global.EN_PACE_OVERLAP_TAG			= 0
    AFE1.component.segment.AFE4960.AFE4960_global.USE_PACE_OVERLAP_TAG			= 0
    AFE1.component.segment.AFE4960.AFE4960_global.USE_BOTH_PACE_TAGS			= 0
    AFE1.component.segment.AFE4960.AFE4960_global.EN_PACE_TAG_ECG_CH1			= 1
    AFE1.component.segment.AFE4960.AFE4960_global.EN_PACE_TAG_ECG_CH2			= 1 
    
    """AFE2 Pace pulse detect configuration"""
    AFE2.component.segment.AFE4960.AFE4960_global.EN_PACE						= 1
    AFE2.component.segment.AFE4960.AFE4960_global.PACE_SET_HIGH_2				= 1
    AFE2.component.segment.AFE4960.AFE4960_global.PACE_SET_HIGH_1				= 1
    AFE2.component.segment.AFE4960.AFE4960_global.PACE_SET_HIGH_0				= 1
    AFE2.component.segment.AFE4960.AFE4960_global.PACE_CONFIG_REG1 				= 995684
    AFE2.component.segment.AFE4960.AFE4960_global.PACE_CONFIG_REG2				= 1048256
    AFE2.component.segment.AFE4960.AFE4960_global.PACE_DIS_RESP_REJECT			= 1
    AFE2.component.segment.AFE4960.AFE4960_global.SEL_CLK_PACE					= 0
    AFE2.component.segment.AFE4960.AFE4960_global.WIDTH_PACE_MIN				= 4
    AFE2.component.segment.AFE4960.AFE4960_global.WIDTH_PACE_MAX				= 135
    AFE2.component.segment.AFE4960.AFE4960_global.PACE_OBS_EXTEND				= 1
    AFE2.component.segment.AFE4960.AFE4960_global.PACE_VALID_COMPLETE			= 1
    AFE2.component.segment.AFE4960.AFE4960_global.PACE_REF1_H					= 2
    AFE2.component.segment.AFE4960.AFE4960_global.PACE_REF1_L					= 2
    AFE2.component.segment.AFE4960.AFE4960_global.PACE_FIFO_DATA_CTRL			= 0
    AFE2.component.segment.AFE4960.AFE4960_global.EN_PACE_WINDOW_ADC_RDY		= 0
    AFE2.component.segment.AFE4960.AFE4960_global.EN_PACE_WINDOW_GPIO2			= 0
    AFE2.component.segment.AFE4960.AFE4960_global.EN_PACE_VALID_TAG				= 1
    AFE2.component.segment.AFE4960.AFE4960_global.EN_PACE_OVERLAP_TAG			= 0
    AFE2.component.segment.AFE4960.AFE4960_global.USE_PACE_OVERLAP_TAG			= 0
    AFE2.component.segment.AFE4960.AFE4960_global.USE_BOTH_PACE_TAGS			= 0
    AFE2.component.segment.AFE4960.AFE4960_global.EN_PACE_TAG_ECG_CH1			= 1
    AFE2.component.segment.AFE4960.AFE4960_global.EN_PACE_TAG_ECG_CH2			= 1 
    
    """AFE1 Interrupt configuration"""
    AFE1.component.segment.AFE4960.AFE4960_global.MASK_DC_LEAD_DET				= 0
    AFE1.component.segment.AFE4960.AFE4960_global.MASK_AC_LEAD_ON				= 1
    AFE1.component.segment.AFE4960.AFE4960_global.MASK_AC_LEAD_OFF				= 1
    AFE1.component.segment.AFE4960.AFE4960_global.MASK_ADC_FIFO_RDY				= 1
    AFE1.component.segment.AFE4960.AFE4960_global.MASK_PACE_VALID_INT			= 0
    AFE1.component.segment.AFE4960.AFE4960_global.MASK_DISABLE1					= 1
    AFE1.component.segment.AFE4960.AFE4960_global.MASK_DISABLE2					= 1
    
    """AFE2 Interrupt configuration"""
    AFE2.component.segment.AFE4960.AFE4960_global.INT_MUX_ADC_RDY_1				= 2
    AFE2.component.segment.AFE4960.AFE4960_global.MASK_DC_LEAD_DET				= 0
    AFE2.component.segment.AFE4960.AFE4960_global.MASK_AC_LEAD_ON				= 1
    AFE2.component.segment.AFE4960.AFE4960_global.MASK_AC_LEAD_OFF				= 1
    AFE2.component.segment.AFE4960.AFE4960_global.MASK_ADC_FIFO_RDY				= 1  
    AFE2.component.segment.AFE4960.AFE4960_global.MASK_PACE_VALID_INT			= 0
    AFE2.component.segment.AFE4960.AFE4960_global.MASK_DISABLE1					= 1
    AFE2.component.segment.AFE4960.AFE4960_global.MASK_DISABLE2					= 1
    
    """AFE1 128K CLK ON GPIO2"""		
    AFE1.component.segment.AFE4960.AFE4960_global.EN_GPIO2_OUT					= 1
    AFE1.component.segment.AFE4960.AFE4960_global.INT_MUX_GPIO2_2				= 0
    AFE1.component.segment.AFE4960.AFE4960_global.INT_MUX_GPIO2_1				= 0
    AFE1.component.segment.AFE4960.AFE4960_global.EN_128K_CLKOUT				= 1
    
    """AFE1 RAC RST OUT ON ADC RDY"""		
    AFE1.component.segment.AFE4960.AFE4960_global.INT_MUX_ADC_RDY_2				= 1
    AFE1.component.segment.AFE4960.AFE4960_global.INT_MUX_ADC_RDY_1				= 3
    AFE1.component.segment.AFE4960.AFE4960_global.INPUT_OUTPUT_RAC_RST			= 1
    
    """AFE2 RAC RST IN ON GPIO2"""
    AFE2.component.segment.AFE4960.AFE4960_global.EN_GPIO2_IN					= 1
    AFE2.component.segment.AFE4960.AFE4960_global.EN_GPIO2_OUT					= 0
    AFE2.component.segment.AFE4960.AFE4960_global.INT_MUX_GPIO2_2				= 0
    AFE2.component.segment.AFE4960.AFE4960_global.INT_MUX_GPIO2_1				= 0
    AFE2.component.segment.AFE4960.AFE4960_global.INPUT_OUTPUT_RAC_RST			= 3
    
    """AFE1 Clocking configuration"""		
    AFE1.component.segment.AFE4960.AFE4960_global.SEL2_CLK_TE					= 1
    AFE1.component.segment.AFE4960.AFE4960_global.OSCL_DIS						= 1
    AFE1.component.segment.AFE4960.AFE4960_global.EN_OSCL_SYNC					= 0
    AFE1.component.segment.AFE4960.AFE4960_global.DIS_DYN_PDN_OSCH				= 1
    AFE1.component.segment.AFE4960.AFE4960_global.SEL1_CLK_BIOZ					= 1
    AFE1.component.segment.AFE4960.AFE4960_global.SEL2_CLK_BIOZ					= 1
    AFE1.component.segment.AFE4960.AFE4960_global.EN_PLL						= 1
    AFE1.component.segment.AFE4960.AFE4960_global.SEL2_CLK_RAC					= 1
    AFE1.component.segment.AFE4960.AFE4960_global.SEL1_CLK_RAC					= 0
    AFE1.component.segment.AFE4960.AFE4960_global.SEL1_CLK_TE					= 0
    AFE1.component.segment.AFE4960.AFE4960_global.DIV_TE_RAC_OUT_EN				= 1
    AFE1.component.segment.AFE4960.AFE4960_global.DIV_IN_BIOZ					= 0
    AFE1.component.segment.AFE4960.AFE4960_global.DIV_FB_PLL					= 4
    AFE1.component.segment.AFE4960.AFE4960_global.DIV_OUT_RAC					= 1
    AFE1.component.segment.AFE4960.AFE4960_global.DIV_OUT_BIOZ					= 2
    
    """AFE2 Clocking configuration"""		
    AFE2.component.segment.AFE4960.AFE4960_global.SEL2_CLK_TE					= 0
    AFE2.component.segment.AFE4960.AFE4960_global.OSCL_DIS						= 1
    AFE2.component.segment.AFE4960.AFE4960_global.EN_OSCL_SYNC					= 0
    AFE2.component.segment.AFE4960.AFE4960_global.DIS_DYN_PDN_OSCH				= 0
    AFE2.component.segment.AFE4960.AFE4960_global.SEL1_CLK_BIOZ					= 1
    AFE2.component.segment.AFE4960.AFE4960_global.SEL2_CLK_BIOZ					= 0
    AFE2.component.segment.AFE4960.AFE4960_global.EN_PLL						= 0
    AFE2.component.segment.AFE4960.AFE4960_global.SEL2_CLK_RAC					= 0
    AFE2.component.segment.AFE4960.AFE4960_global.SEL1_CLK_RAC					= 1
    AFE2.component.segment.AFE4960.AFE4960_global.SEL1_CLK_TE					= 1
    AFE2.component.segment.AFE4960.AFE4960_global.DIV_TE_RAC_OUT_EN				= 0
    AFE2.component.segment.AFE4960.AFE4960_global.DIV_IN_BIOZ					= 0
    AFE2.component.segment.AFE4960.AFE4960_global.DIV_FB_PLL					= 0
    AFE2.component.segment.AFE4960.AFE4960_global.DIV_OUT_RAC					= 0
    AFE2.component.segment.AFE4960.AFE4960_global.DIV_OUT_BIOZ					= 0
    
    """AFE1 DC Lead Detection Configuration """
    AFE1.component.segment.AFE4960.AFE4960_global.SW_RBIAS1_ECGP 				= 1
    AFE1.component.segment.AFE4960.AFE4960_global.SW_RBIAS1_LEAD_BIAS 			= 1
    AFE1.component.segment.AFE4960.AFE4960_global.POL_RBIAS1_LEAD_BIAS 			= 0
    AFE1.component.segment.AFE4960.AFE4960_global.SW_RBIAS2_ECGM 				= 1
    AFE1.component.segment.AFE4960.AFE4960_global.SW_RBIAS2_LEAD_BIAS 			= 1
    AFE1.component.segment.AFE4960.AFE4960_global.POL_RBIAS2_LEAD_BIAS 			= 1
    AFE1.component.segment.AFE4960.AFE4960_global.SW_RBIAS3_ECG1 				= 3
    AFE1.component.segment.AFE4960.AFE4960_global.SW_RBIAS3_LEAD_BIAS 			= 1
    AFE1.component.segment.AFE4960.AFE4960_global.POL_RBIAS3_LEAD_BIAS 			= 0
    AFE1.component.segment.AFE4960.AFE4960_global.SW_RBIAS4_ECG2 				= 3
    AFE1.component.segment.AFE4960.AFE4960_global.SW_RBIAS4_LEAD_BIAS 			= 0
    AFE1.component.segment.AFE4960.AFE4960_global.POL_RBIAS4_LEAD_BIAS 			= 0
    AFE1.component.segment.AFE4960.AFE4960_global.SEL_RBIAS_CH1 				= 0
    AFE1.component.segment.AFE4960.AFE4960_global.SEL_RBIAS_CH2 				= 0
    AFE1.component.segment.AFE4960.AFE4960_global.LEAD_DET_THR_L 				= 3
    AFE1.component.segment.AFE4960.AFE4960_global.LEAD_DET_THR_H 				= 3
    AFE1.component.segment.AFE4960.AFE4960_global.EN_COMP_ANA 					= 1
    AFE1.component.segment.AFE4960.AFE4960_global.LEAD_DET_MODULE_CLK_EN 		= 1
    AFE1.component.segment.AFE4960.AFE4960_global.LEAD_DET_WIDTH 				= 100
    
    """AFE2 DC Lead Detection Configuration """
    AFE2.component.segment.AFE4960.AFE4960_global.SW_RBIAS1_ECGP 				= 1
    AFE2.component.segment.AFE4960.AFE4960_global.SW_RBIAS1_LEAD_BIAS 			= 1
    AFE2.component.segment.AFE4960.AFE4960_global.POL_RBIAS1_LEAD_BIAS 			= 0
    AFE2.component.segment.AFE4960.AFE4960_global.SW_RBIAS2_ECGM 				= 1
    AFE2.component.segment.AFE4960.AFE4960_global.SW_RBIAS2_LEAD_BIAS 			= 1
    AFE2.component.segment.AFE4960.AFE4960_global.POL_RBIAS2_LEAD_BIAS 			= 1
    AFE2.component.segment.AFE4960.AFE4960_global.SW_RBIAS3_ECG1 				= 3
    AFE2.component.segment.AFE4960.AFE4960_global.SW_RBIAS3_LEAD_BIAS 			= 1
    AFE2.component.segment.AFE4960.AFE4960_global.POL_RBIAS3_LEAD_BIAS 			= 0
    AFE2.component.segment.AFE4960.AFE4960_global.SW_RBIAS4_ECG2 				= 3
    AFE2.component.segment.AFE4960.AFE4960_global.SW_RBIAS4_LEAD_BIAS 			= 0
    AFE2.component.segment.AFE4960.AFE4960_global.POL_RBIAS4_LEAD_BIAS 			= 0
    AFE2.component.segment.AFE4960.AFE4960_global.SEL_RBIAS_CH1 				= 0
    AFE2.component.segment.AFE4960.AFE4960_global.SEL_RBIAS_CH2 				= 0
    AFE2.component.segment.AFE4960.AFE4960_global.LEAD_DET_THR_L 				= 3
    AFE2.component.segment.AFE4960.AFE4960_global.LEAD_DET_THR_H 				= 3
    AFE2.component.segment.AFE4960.AFE4960_global.EN_COMP_ANA 					= 1
    AFE2.component.segment.AFE4960.AFE4960_global.LEAD_DET_MODULE_CLK_EN		= 1
    AFE2.component.segment.AFE4960.AFE4960_global.LEAD_DET_WIDTH 				= 100
    
    
    
    
    """Software requirements"""
    """Update the sequence of data in FIFO"""
    FIFO_ORDER_AFE1																= np.array(["LEAD V1",	\
    																						"LEAD V1",	\
    																						"LEAD V1",	\
    																						"LEAD V1",	\
    																						"LEAD V1",	\
    																						"LEAD V1",	\
    																						"LEAD V1",	\
    																						"LEAD V1",	\
    																						"LEAD V1",	\
    																						"LEAD V1",	\
    																						"LEAD V1",	\
    																						"LEAD V1",	\
    																						"LEAD V1",	\
    																						"LEAD V1",	\
    																						"LEAD V1",	\
    																						"LEAD V1",	\
    																						"AFE1_RESP_I", "AFE1_RESP_Q"])
    																						
    FIFO_ORDER_AFE2																= np.array(["LEAD II","LEAD I"])
    
    regCapture._controller.updateFiFoOrder(FIFO_ORDER_AFE1,FIFO_ORDER_AFE2)
    
    """Update the data rate"""
    dataToAddDict										= {"KEY":"LEAD V1", 		"DATA_RATE":"666.666666667"}
    addData(dataToAddDict)		
    dataToAddDict										= {"KEY":"LEAD V1_RAW", 	"DATA_RATE":"666.666666667"}
    addData(dataToAddDict)		
    dataToAddDict										= {"KEY":"AFE1_RESP_I", 		"DATA_RATE":"41.6666666667"}
    addData(dataToAddDict)		
    dataToAddDict										= {"KEY":"AFE1_RESP_I_RAW", 	"DATA_RATE":"41.6666666667"}
    addData(dataToAddDict)		
    		
    dataToAddDict										= {"KEY":"AFE1_RESP_Q", 		"DATA_RATE":"41.6666666667"}
    addData(dataToAddDict)		
    dataToAddDict										= {"KEY":"AFE1_RESP_Q_RAW", 	"DATA_RATE":"41.6666666667"}
    addData(dataToAddDict)		
    		
    dataToAddDict										= {"KEY":"LEAD II", 		"DATA_RATE":"666.666666667"}
    addData(dataToAddDict)		
    dataToAddDict										= {"KEY":"LEAD II_RAW", 	"DATA_RATE":"666.666666667"}
    addData(dataToAddDict)		
    dataToAddDict										= {"KEY":"LEAD I", 		"DATA_RATE":"666.666666667"}
    addData(dataToAddDict)		
    dataToAddDict										= {"KEY":"LEAD I_RAW", 	"DATA_RATE":"666.666666667"}
    addData(dataToAddDict)		
    		
    		
    """Mandatory register to read"""		
    dataToAddDict										= {"KEY":"REG_6D", 				"DATA_RATE":"666.666666667"}
    addData(dataToAddDict)		
    		
    """Additional register to read"""		
    dataToAddDict										= {"KEY":"REG_BC", 				"DATA_RATE":"666.666666667"}
    addData(dataToAddDict)
    
    """Add data for plotting"""
    addDataToPlot("'LEAD V1'", 									1, filter="Enable", color=color['Blue'])
    addDataToPlot("AMPLITUDE('AFE1_RESP_I','AFE1_RESP_Q')",	  	2, filter="Disable", color=color['Maroon'])
    addDataToPlot("'LEAD II'", 									3, filter="Enable", color=color['Green'])
    addDataToPlot("'LEAD I'", 									4, filter="Enable", color=color['Red'])
    # addDataToPlot("PACE_STATUS('AFE1_REG_BC')",					3, filter="Disable", color=color['Red'])
    # addDataToPlot("PACE_STATUS('AFE2_REG_BC')",					4, filter="Disable", color=color['Green'])
    
    MODE	= "DUAL_AFE_3ECG_1RESP"
    
    START_LEAD_STATUS_CHECK()

    Regards,

    Ryan

  • Hi Ryan

    "This is Nandy, posting on behalf of Aswath with a query related to Dual AFE. On activating the Dual AFE, I encountered an error and warning saying 'reset property not found' when trying to collect data using the script you mentioned earlier. I have also attached screenshots of the warning message, and the waves generated by the script."

  • Hi Nandy,

    Thank you for the update. You can ignore the yellow warnings about "Reset property not found."

    Since you are flashing the dual-AFE firmware from the AFE4960-DESIGN folder (non-"P" version), I'm wondering if there's some dependency in the GUI. Please follow the steps below:

    1. Unplug EVM and close Bio-Sensing software
    2. Install the latest version of AFE4960EVM software (v2.7).
    3. Plug in EVM and run Bio-Sensing GUI
    4. From AFE4960EVM profile, run "devInit.py" and "DUAL_AFE_3ECG_1RESP.py" scripts. You can create a new script and paste the script I shared previously instead if desired.

    Also, don't forget to change the positions of V1 and LL as I pointed out in my previous post.

    By the way - does your Cardiosim III have respiration functionality? I tried to verify this on the Biometric Cables website and I do not see this feature listed. Therefore, you will only be able to validate the 3 ECG channels in this script.

    Regards,

    Ryan

  • Hi Ryan,

    Yes, the latest version of the software is working fine. to proceed further, we have decided to interface the AFE4690EVM with the STM32F7 series controller. For this, we need the source code used for interfacing with the MSP430F5528."

  • Hello Nandy,

    I'm glad we have finally resolved the issue! I'm sorry it took this long, but we will be sure to document the behavior and correct in the future.

    The EVM firmware is included in the AFE4960-DESIGN and AFE4960P-DESIGN resources folders to which Aswath and Sapna already have access.

    Please let me know if you need further assistance.

    Regards,

    Ryan

  • Hello Ryan,

    I have found the resource folders for the AFE4690.But I have a doubt regarding the datasheet on page 250, which mentions setting INT_MUX_ADC_RDY_1 to 3 for synchronizing the clocking of two AFE devices. I cannot set that bit in its respective register with address 42H, as the revision history indicates that this bit has been deleted. Is there an alternate name for it?

  • Hi Nandy,

    Thank you for bringing this to our attention. We recently noticed this mistake in the data sheet and we're already looking into it. I'll update you once I hear from the design team where these bits can be configured.

    Regards,

    Ryan

  • Hi Nandy,

    INT_MUX_ADC_RDY_1 is located in bits [5:4] in address 42h (CONTROL9). This was deleted from the register map table in the AFE4960P data sheet accidentally. You can refer to the AFE4960 data sheet to confirm. The settings described throughout the AFE4960P data sheet are still valid.

    Sorry for the confusion. We have noted the mistake for the next data sheet revision.

    Regards,

    Ryan

  • Hello Ryan,

    Thanks for confirming. Regarding the EN_PACE_COMP2 bit on page 158, it is mentioned as the first bit of the DAh register. However, on page 225, the register definition seems to indicate something different. Could you clarify where exactly this bit can be set.

  • Hi Nandy,

    The EN_PACE_COMP2 bit is located at bit 1 in address DAh (CONFIG_PACE_DETECT). This has also been noted for future updates.

    Regards,

    Ryan