Tool/software:
Hello, I am trying to receive data from DDC264 to STM32 MCU
I established protocol according to the manual in the attached picture you can see the image from the oscilloscope
But I didn't receive any meaningful data it is just a random values.
Reset pin from DDC264 connected to 3.3V
For "CLK" from DDC264 established frequency - 2MHz
I didn't write any registers to DDC264 I just want to read data from DDC264 with factory settings.
So how work now
- Detect when "DVALID" moves from 1 to 0
- Start reading 128 bytes via SPI
- Toggle "CONV"
the script looks like thatHAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_1); // for CLK while (1) { if (HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_6) == GPIO_PIN_RESET) // detect { HAL_SPI_TransmitReceive(&hspi2,(uint8_t*)&test_64,&received_Byte_64,128,0x100); data_bytes[1] = received_Byte_64[127]; data_bytes[0] = received_Byte_64[126]; dataPacket = (data_bytes[0] << 8) | data_bytes[1]; send_data_by_uart(dataPacket); // only send firts channel HAL_GPIO_TogglePin(GPIOK, GPIO_PIN_1); // Toggle CONV } }
Can you tell me where the error might be?
Regards, Ildar