Driving WS2812 LED's with STM32 DMA+Timer

The WS2812 aka the Neopixel is a very well know LED, it combines a fully self-contained PWM driver ic with RGB led’s in a cheap and (relatively) painless to work with package. The downside to these is their not-very-fun protocol that requires effort to ensure you drive it at the correct timing. Other fantastic people have already done a deep dive into this protocol. The TL;DR is that the protocol works out to encode the bit as 0 or 1 based on the pulse length, with minimum off times between bits. Otherwise, there is a very long off time to latch the data and reset the state machine. Thats it. ...

July 1, 2021 · 12 min · Ben V. Brown

Fixing stupid JMS578 HDD Enclosure issues

The stupid state of JMicron drive interface IC’s If you have ever tried to use a USB3.0 hard drive enclosure based on a JMicron chipset with TrueNAS (formerly FreeNAS); you may have come across multipath errors or serial numbers that make no sense. Or simply SMART and TRIM not functioning. Additionally, you may have run into the stupid way these units power down the drives after 10 minutes of inactivity forcefully. Completely ignoring OS or HDD settings. This is infuriating if you want the drives to do what you tell them. ...

January 10, 2021 · 5 min · Ben V. Brown

SD cards with STM32 over SPI

The time has come that I finally need to look into getting SD cards to work with the stm32. Looking online there seems to be a few really great resources for connecting to a SD card over spi from a smaller lower power however I could not find any guides for the STM32 line of chips. I am currently working using the HAL libraries as this allows for flexibility in working with different chips (in theory!). This does come at a cost of performance, however I have found the cost to be fairly low compared to being able to have already setup functions for most things. ...

November 4, 2016 · 10 min · Ben V. Brown

STM32 ADC with DMA

Most of my current projects are using the very, very nice stm32f103 series of chips, as these provide excellent performance per dollar cost. The embedded DMA in these chips is a massive help in getting a project up and running without any struggle for cpu power. I find the DMA documentation to be lacking at best with getting this system up and running using the new HAL drivers from STM. While this is actually quite an easy system to get up and running, I could not find any nice notes on how the system should be setup and things to be aware of. ...

November 2, 2016 · 5 min · Ben V. Brown

TS100 Soldering Iron

TS100 The ts100 is a portable DC powered soldering iron released by minidso. The unit offers between 25-70W of output power at the tip depending on the input voltage, and has removable tips (Not compatible with other irons as far as I know). Sadly the unit is crippled with their system for changing settings, while the unit supports nice options such as a customizable cutoff voltage; wake on motion, and automatic sleep times. They decided to make these options only available to be changed using the USB connection to the computer. ...

October 1, 2016 · 3 min · Ben V. Brown

Converting Reaver Pro to OpenWRT

Converting the Reaver Pro to run stock OpenWRT I bought one of the Reaver Pro units a fair while ago back when they were more useful.. Now that most routers have protection against the WPS exploit it has become mostly useless. However the unit itself is actually a really nice Alfa Networks HornetUB2 with upgraded Flash to 16MB and Ram to 64MB. Problem The U-Boot used on the router does not support the setenv command, and the unit comes with the memory boot location hard coded to 0x9f050000 which is NOT what all the documentation online appears to refer to. ...

July 27, 2016 · 12 min · Ben V. Brown