uranyumx
Advanced Member level 4
Hello,
I have tried to generate square wave signals with TMUX1122DGKR switch. Basically, the stm32 feeds two analog signals from its internal DAC, the switch generates square pulses based on SET and RESET commands. But at the output signals, there is an extra 250 mV pulses on the blue signals. I didn't understand why it happened. Do you have any suggestion on that?
Thank you,
I have tried to generate square wave signals with TMUX1122DGKR switch. Basically, the stm32 feeds two analog signals from its internal DAC, the switch generates square pulses based on SET and RESET commands. But at the output signals, there is an extra 250 mV pulses on the blue signals. I didn't understand why it happened. Do you have any suggestion on that?
Thank you,
Code:
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
// Stimulation Voltage Signal Generation
DAC1_Out = DAC1_Buf*(4096)/3.3;
HAL_DAC_SetValue(&hdac, DAC_CHANNEL_1, DAC_ALIGN_12B_R, DAC1_Out);
//HAL_Delay(1);
HAL_DAC_SetValue(&hdac, DAC_CHANNEL_2, DAC_ALIGN_12B_R, DAC1_Out);
//delay_us(200);
HAL_GPIO_WritePin(PHASE_SEL_1_GPIO_Port, PHASE_SEL_1_Pin, GPIO_PIN_SET);
delay_us(200);
HAL_GPIO_WritePin(PHASE_SEL_1_GPIO_Port, PHASE_SEL_1_Pin, GPIO_PIN_RESET);
delay_us(100);
HAL_GPIO_WritePin(PHASE_SEL_2_GPIO_Port, PHASE_SEL_2_Pin, GPIO_PIN_SET);
delay_us(200);
HAL_GPIO_WritePin(PHASE_SEL_2_GPIO_Port, PHASE_SEL_2_Pin, GPIO_PIN_RESET);
delay_us(400);