Patience is a virtue

I found the bug in the TCD1304 driver firmware, or maybe I should rather say that I publicly exposed a flaw in my personality. I’m too impatient.

In the previous firmware the integration time was set to 1 s by default. Because I couldn’t always wait 1 s from I reset the nucleo board before pressing ‘record’ I got the aforementioned unpredictable behaviour.

I’ve long ago realised that it’s much easier to change my surroundings than my personality, and so I’ve changed the new default integration time is 20 µs. This gives the nucleo time to catch it’s breath before I try and interact with it after a reset.

This small but significant change ensures consistently good behaviour. And here is what may well be the last revision of the firmware for STM32F401RE in a long time:

Source code for the TCD1304 driver

You may also find it on There’s also a short one-page-write-up of how to get everything up and running, in case you don’t feel like reading through every other post I’ve made on this blog.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.