<feed xmlns='http://www.w3.org/2005/Atom'>
<title>stm32l4.git/src, branch working</title>
<subtitle>My bare metal hacking on an stm32l432
</subtitle>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/'/>
<entry>
<title>Add a little white flair to the LED strip</title>
<updated>2020-12-05T07:05:09+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2020-12-05T07:05:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=04da2a442392c5bf3dcf4ca4611f42af7b35e596'/>
<id>04da2a442392c5bf3dcf4ca4611f42af7b35e596</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Added some better implementation around the ws2812b driver.</title>
<updated>2020-12-05T06:51:38+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2020-12-05T06:51:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=64b827a84ac87bf39e13a570cbd80ef0baa2b913'/>
<id>64b827a84ac87bf39e13a570cbd80ef0baa2b913</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Added kernel-level abstraction over the spi interface.</title>
<updated>2020-12-05T06:16:31+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2020-12-05T06:16:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=7002cb8380406173407c9e8c8d16ebd670fff55c'/>
<id>7002cb8380406173407c9e8c8d16ebd670fff55c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add systick/...</title>
<updated>2020-12-05T03:34:20+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2020-12-05T03:34:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=83deae717de8b940b0cb04d1d1989b0a4c250e35'/>
<id>83deae717de8b940b0cb04d1d1989b0a4c250e35</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Double the SPI bandwith by writing only 8 bits to the spi data register instead of 16 (with 8 leading 0's).</title>
<updated>2020-12-04T05:45:47+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2020-12-04T05:45:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=9e349913f728e47e09852a20a7e16c405d30cd7b'/>
<id>9e349913f728e47e09852a20a7e16c405d30cd7b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Basic working example with minimal flicker and correct color.</title>
<updated>2020-12-04T05:35:58+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2020-12-04T05:35:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=4466725d3facb939f60f598caa684766b50a4235'/>
<id>4466725d3facb939f60f598caa684766b50a4235</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>The lights really work this time.</title>
<updated>2020-11-30T04:02:37+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2020-11-30T04:02:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=9caddf6c5c0dce43a531c3dc8cf2831195ea0876'/>
<id>9caddf6c5c0dce43a531c3dc8cf2831195ea0876</id>
<content type='text'>
I also found out that the noise in the lighhts was coming from the USB
debug interface. For whatever reason it doesn't appear that the spi pins
are not well isolated from the debugger noise so unplugging and running
off one power source works pretty well.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I also found out that the noise in the lighhts was coming from the USB
debug interface. For whatever reason it doesn't appear that the spi pins
are not well isolated from the debugger noise so unplugging and running
off one power source works pretty well.
</pre>
</div>
</content>
</entry>
<entry>
<title>Have a stable red/green pattern on my LED strip.</title>
<updated>2020-11-29T07:50:10+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2020-11-29T07:50:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=1ec4e164df03fae8c42fd7aea2614fa836bcc2d7'/>
<id>1ec4e164df03fae8c42fd7aea2614fa836bcc2d7</id>
<content type='text'>
I finally got a stable red/green pattern to show up on the LED strip.
Unfortunately I had to do this manually because my driver is broken. No
Dma, interrupts or drivers, but manually writing to the spi bus.

Currently the driver assums the data sheet doesn't lie and inflates each
bit 3:1 so a 1 is a 110 pattern and a 0 is a 100 pattern. This should be
well within the tolerances at 2.5Mhz, but alas it's not.

I figured out that it's better to inflate each bit to a 4:1 ratio so a 1
is a 1100 pattern and a 0 is a 1000 pattern. This appears to produce
cleaner results.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I finally got a stable red/green pattern to show up on the LED strip.
Unfortunately I had to do this manually because my driver is broken. No
Dma, interrupts or drivers, but manually writing to the spi bus.

Currently the driver assums the data sheet doesn't lie and inflates each
bit 3:1 so a 1 is a 110 pattern and a 0 is a 100 pattern. This should be
well within the tolerances at 2.5Mhz, but alas it's not.

I figured out that it's better to inflate each bit to a 4:1 ratio so a 1
is a 1100 pattern and a 0 is a 1000 pattern. This appears to produce
cleaner results.
</pre>
</div>
</content>
</entry>
<entry>
<title>Some LED lights working. Not great. WIP</title>
<updated>2020-11-29T06:21:22+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2020-11-29T06:21:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=fd674424d19cf12c1186394606729cff236d5bdf'/>
<id>fd674424d19cf12c1186394606729cff236d5bdf</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix kalloc bug.</title>
<updated>2020-11-28T21:46:32+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2020-11-28T21:46:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/stm32l4.git/commit/?id=0ed233b879675929559fb413dd7e018d5aee26c3'/>
<id>0ed233b879675929559fb413dd7e018d5aee26c3</id>
<content type='text'>
Bitfields are officially stupid. Bizzarre behavior was found in how the
bitfields integers were overflowing and causing other members to change
value, causing really screwy behavior. In addition, with the discovery
of 48k being available to the heap, a 12-bit value was no longer
sufficient to define the size.

I rewrote parts of the kalloc code to allow a generic size for the
kalloc header because now it'll require 2 words per block allocated,
and who knows what size the header will be on different platforms
with more memory.

Unfortunately, the second word of the header consists only of the "used"
bool. Because I wish to keep alignmennt with 32-bit words, 31 bits are
"wasted." However, these bits are used as a canary value to detect
heap corruption, so they're not completely wasted.

Also, testing was broken since adding the huge amount of platform
dependent code for doing system calls. These dependent parts were
put under a macro guard so they don't interfere with the x86 testing.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bitfields are officially stupid. Bizzarre behavior was found in how the
bitfields integers were overflowing and causing other members to change
value, causing really screwy behavior. In addition, with the discovery
of 48k being available to the heap, a 12-bit value was no longer
sufficient to define the size.

I rewrote parts of the kalloc code to allow a generic size for the
kalloc header because now it'll require 2 words per block allocated,
and who knows what size the header will be on different platforms
with more memory.

Unfortunately, the second word of the header consists only of the "used"
bool. Because I wish to keep alignmennt with 32-bit words, 31 bits are
"wasted." However, these bits are used as a canary value to detect
heap corruption, so they're not completely wasted.

Also, testing was broken since adding the huge amount of platform
dependent code for doing system calls. These dependent parts were
put under a macro guard so they don't interfere with the x86 testing.
</pre>
</div>
</content>
</entry>
</feed>
