I am using an ESP32-C3 in order to configure and read data from a microcamera. This microcamera needs to be provided with a continuous clock signal in the range of 10 to 75 MHz. Using the clock signal from the SPI peripheral would be a good solution. The problem is that the clock signal (as expected per protocol) is only active when a transaction is transmitted. I'd like to know if there is a way to keep active the clock signal, and still be able to provide configuration data and read pixel data when I think it is necessary.
I am of course open to other alternatives than SPI, but I just thought it is the most appropriate protocol. Thanks.
SPI clock signal always active
-
- Posts: 9764
- Joined: Thu Nov 26, 2015 4:08 am
Re: SPI clock signal always active
If it doesn't need to be synced with anything, I'd use the LEDC to generate that clock.
Re: SPI clock signal always active
No, the clock needs to be synchronized when sending the configuration data to the microcamera. Which options do I have then?
-
- Posts: 9764
- Joined: Thu Nov 26, 2015 4:08 am
Re: SPI clock signal always active
Do you have a datasheet or something that details the protocol you're trying to speak a bit more? Having SCLK pulsing continuously indeed is not something the SPI peripheral supports by itself, but there may be a workaround.
Re: SPI clock signal always active
Yes, I attach it. We are using the cameras in SEIM mode. This means that there are two phases: The DATA+ line
carries the data from the ESP32 to the µcamera while DATA- line transmits the clock; reading phase, the ESP32 provides the clock signal in DATA- and the camera pixel information in the DATA+.
Thanks for the help.
carries the data from the ESP32 to the µcamera while DATA- line transmits the clock; reading phase, the ESP32 provides the clock signal in DATA- and the camera pixel information in the DATA+.
Thanks for the help.
- Attachments
-
- 43_OsirisM_SensorSpecification_v1.1.0.pdf
- (2.28 MiB) Downloaded 107 times
-
- Posts: 9764
- Joined: Thu Nov 26, 2015 4:08 am
Re: SPI clock signal always active
Given the fact that there's no CS line involved, I2S may be the best option to do what you want: it sends out a continuous bitclock and you can receive and transmit 1-bit data. The only thing that may be problematic is configuration as I2S signals traditionally have a fair bit of buffering on them and you'd need to do rx <-> tx switching manually, however if you only configure the sensor e.g. on startup this should not be an issue.
Who is online
Users browsing this forum: Google [Bot] and 86 guests