---
title: "Kim Lillås (@klillas) | Hashnode"
description: "Professional software developer with an interest in anything and everything technical. Read the latest articles by Kim Lillås on Hashnode."
url: "https://hashnode.com/@klillas"
---

@klillas

# Kim Lillås

@klillas · Joined January 2024

Professional software developer with an interest in anything and everything technical

### [Selecting the highest resolution STM32 USART clock divisor](https://owningmymistakes.hashnode.dev/selecting-the-highest-resolution-stm32-usart-clock-divisor?utm_source=hashnode&utm_medium=feed)

STM32 USART stores a clock divisor into its USART\_BRR register to configure the baudrate of the USART. The BRR register only has 16 bits in use, with the most significant 12 bits storing the clock divisor. The clock divisor and 8/16 sampling rate set...

2 min read · [owningmymistakes.hashnode.dev](https://owningmymistakes.hashnode.dev/selecting-the-highest-resolution-stm32-usart-clock-divisor?utm_source=hashnode&utm_medium=feed)

[Feb 11, 2024](https://hashnode.com/posts/selecting-the-highest-resolution-stm32-usart-clock-divisor/65c921d66f483102a82ef07d)

### [Careful about function-like macro parameter naming](https://owningmymistakes.hashnode.dev/careful-about-function-like-macro-parameter-naming?utm_source=hashnode&utm_medium=feed)

I needed to create a function-like macro which set a parameter in a default settings struct, simple enough. struct Settings { unsigned enabled; }; struct Settings defaultSettings; #define SetEnabled(enabled) (defaultSettings.enabled = enabled) ...

1 min read · [owningmymistakes.hashnode.dev](https://owningmymistakes.hashnode.dev/careful-about-function-like-macro-parameter-naming?utm_source=hashnode&utm_medium=feed)

[Feb 7, 2024](https://hashnode.com/posts/careful-about-function-like-macro-parameter-naming/65c3d59da7fd587166d7478e)

### [CaPiTaLiZaTiOn](https://owningmymistakes.hashnode.dev/capitalization?utm_source=hashnode&utm_medium=feed)

I was in the middle of adding DMA to my STM32 QuadSPI driver using the ST HAL layer. For the HAL layer to update its QSPI state I need to catch the QUADSPI\_IRQn IRQ and call the corresponding HAL QSPI IRQ-handler. The assembler code below is the STM3...

2 min read · [owningmymistakes.hashnode.dev](https://owningmymistakes.hashnode.dev/capitalization?utm_source=hashnode&utm_medium=feed)

[Jan 31, 2024](https://hashnode.com/posts/capitalization/65ba97e738ab1bb06a5c98df)

### [Yes, you can damage flash memory](https://owningmymistakes.hashnode.dev/yes-you-can-damage-flash-memory?utm_source=hashnode&utm_medium=feed)

I have been writing a driver and hooking up LittleFs to an external SPI connected flash memory, W25Q32BV from Winbond with 32Mbit of memory with 1024 erasable sectors. It worked well, I could write and read data and the file system was working just f...

2 min read · [owningmymistakes.hashnode.dev](https://owningmymistakes.hashnode.dev/yes-you-can-damage-flash-memory?utm_source=hashnode&utm_medium=feed)

[Jan 30, 2024](https://hashnode.com/posts/yes-you-can-damage-flash-memory/65b897180b06f3e4e360f3e2)

### [Keep those configs alive or forever regret it](https://owningmymistakes.hashnode.dev/keep-those-configs-alive-or-forever-regret-it?utm_source=hashnode&utm_medium=feed)

For today's mistake I was initializing LittleFs by defining its lsf\_config struct inside my wrapper code init function. static lfs\_t fileSystem; int LfsReadCallback(const struct lfs\_config \*c, lfs\_block\_t block, lfs\_off\_t off, void \*buffer, lfs\_size...

2 min read · [owningmymistakes.hashnode.dev](https://owningmymistakes.hashnode.dev/keep-those-configs-alive-or-forever-regret-it?utm_source=hashnode&utm_medium=feed)

[Jan 23, 2024](https://hashnode.com/posts/keep-those-configs-alive-or-forever-regret-it/65b01768fe19a0da5dcc556c)
