Q: What’s the difference between the SPI and the UART firmware?
A: A nucleo running the UART-fw can be connected to any (linux) computer through the nucleo board’s USB connection. The data-rate is 115.2 kbps so transmission a full dataset takes 640 ms to complete.
A nucleo running the SPI-fw requires a Raspberry Pi. The nucleo and the rpi must be connected through SPI. The data-rate is 16 Mbps so transmission of a full dataset takes 4 ms.
Needless to say, the firmware and the software interface must use the same communication protocol.
Q: I have an STM32Fxxx, will the firmware run directly on it?
A: Probably not. You need to port the code to make sure the timers are prescaled correctly and can be tied to the GPIOs you want to use. The DMA-channels and streams are probably also different. Confer with the datasheet for your MCU.
Q: I have an STM32Fxxx, can the firmware be ported to it?
A: It’s a good question. The firmware relies on the following peripherals:
- 4 timers (3 for the driving pulses, 1 for triggering the ADC)
- 1 ADC (with a conversion time < 2µs)
- 2 DMA-controllers (1 for the ADC, 1 for UART/SPI)
The STM32F103 for instance, has just one DMA-controller, so porting the firmware to this MCU would require more than simply remapping GPIOs and changing the timer prescalers. It can probably be done, however I wont be the person doing it.
Q: Is it possible to drive other CCDs with the firmware?
A: No. Different CCDs have different driving pulses and timing requirements. You’ll need to tailor the firmware to your CCD.
There is one exception: The TCD1305P / TCD1305DG is compatible with the firmware. However, it’s an inferior chip compared to the TCD1304, and it’s more expensive.