<feed xmlns='http://www.w3.org/2005/Atom'>
<title>embassy/embassy-stm32/src/ospi/mod.rs, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy/'/>
<entry>
<title>Merge branch 'main' of https://github.com/embassy-rs/embassy into xspi</title>
<updated>2025-11-25T03:28:58+00:00</updated>
<author>
<name>xoviat</name>
<email>xoviat@users.noreply.github.com</email>
</author>
<published>2025-11-25T03:28:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy/commit/?id=ee14305d152273254571d2a5a8192fad26f3ab73'/>
<id>ee14305d152273254571d2a5a8192fad26f3ab73</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Rustfmt for edition 2024.</title>
<updated>2025-10-06T21:19:53+00:00</updated>
<author>
<name>Dario Nieuwenhuis</name>
<email>dirbaio@dirbaio.net</email>
</author>
<published>2025-10-06T20:56:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy/commit/?id=8730a013c395cf0bf4c2fa8eeb7f138288103039'/>
<id>8730a013c395cf0bf4c2fa8eeb7f138288103039</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ospi: properly respect the max DMA transfer size when reading</title>
<updated>2025-10-04T07:52:20+00:00</updated>
<author>
<name>Brian Schwind</name>
<email>brianmschwind@gmail.com</email>
</author>
<published>2025-10-04T04:18:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy/commit/?id=ed527e659e0e5d729f9d0ee2f6f15019a144b68a'/>
<id>ed527e659e0e5d729f9d0ee2f6f15019a144b68a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ospi: properly respect the max DMA transfer size when writing</title>
<updated>2025-10-04T07:52:20+00:00</updated>
<author>
<name>Brian Schwind</name>
<email>brianmschwind@gmail.com</email>
</author>
<published>2025-10-04T04:13:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy/commit/?id=5220a76e5f71c4e44c1e2f023df5ea7feb4d4370'/>
<id>5220a76e5f71c4e44c1e2f023df5ea7feb4d4370</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ospi: properly configure the transfer size</title>
<updated>2025-10-04T07:52:20+00:00</updated>
<author>
<name>Brian Schwind</name>
<email>brianmschwind@gmail.com</email>
</author>
<published>2025-10-04T04:05:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy/commit/?id=5e89631367c88e636899ddc3b3d333c92d0a983e'/>
<id>5e89631367c88e636899ddc3b3d333c92d0a983e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ospi: use a named enum variant in place of a literal zero</title>
<updated>2025-10-04T07:52:13+00:00</updated>
<author>
<name>Brian Schwind</name>
<email>brianmschwind@gmail.com</email>
</author>
<published>2025-10-04T04:04:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy/commit/?id=617dd353637d5d99e47c357f9115f6f96144ed6b'/>
<id>617dd353637d5d99e47c357f9115f6f96144ed6b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Write data with the Ospi peripheral in chunks to respect the max DMA transfer size</title>
<updated>2025-09-16T12:28:48+00:00</updated>
<author>
<name>Brian Schwind</name>
<email>brianmschwind@gmail.com</email>
</author>
<published>2025-09-12T11:03:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy/commit/?id=e72e17ded8f5f9f10eb68cc785101e5c7dab73ef'/>
<id>e72e17ded8f5f9f10eb68cc785101e5c7dab73ef</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Handle OSPI address errors</title>
<updated>2025-09-16T07:47:23+00:00</updated>
<author>
<name>goodhoko</name>
<email>goodhoko@gmail.com</email>
</author>
<published>2025-09-15T13:34:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy/commit/?id=8ed1e796bad7b3dbf6e78ea5e5d89b7257571d06'/>
<id>8ed1e796bad7b3dbf6e78ea5e5d89b7257571d06</id>
<content type='text'>
We were using OSPI in indirect mode via DMA and noticed that the transfer future would never resolve. It was forever busy-looping in `finish_dma()` on the `while !regs.sr().read().tcf() {}` line.

After some debugging we noticed that the the `TEF` flag is set. The data sheet says the following about this flag:

&gt; The following errors set the TEF flag in OCTOSPI_SR and generates an interrupt if enabled (TEIE = 1 in OCTOSPI_CR):
&gt; - in indirect or automatic status-polling mode, when a wrong address has been programmed in OCTOSPI_AR (according to the device size defined by DEVSIZE[4:0]).
&gt; - in indirect mode, if the address plus the data length exceed the device size: TEF is set as soon as the access is triggered.

Indeed we were configuring our device size to 0 while specifying a non-zero address.

Detect this condition and return an error early - as soon as we configure the registers (which, according to the data sheet, should be enough to raise the flag)

Also document this behavior on the respective TransferConfig and Config fields.

Testing
-------
See https://github.com/goodhoko/spi-error-test/blob/main/src/main.rs
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We were using OSPI in indirect mode via DMA and noticed that the transfer future would never resolve. It was forever busy-looping in `finish_dma()` on the `while !regs.sr().read().tcf() {}` line.

After some debugging we noticed that the the `TEF` flag is set. The data sheet says the following about this flag:

&gt; The following errors set the TEF flag in OCTOSPI_SR and generates an interrupt if enabled (TEIE = 1 in OCTOSPI_CR):
&gt; - in indirect or automatic status-polling mode, when a wrong address has been programmed in OCTOSPI_AR (according to the device size defined by DEVSIZE[4:0]).
&gt; - in indirect mode, if the address plus the data length exceed the device size: TEF is set as soon as the access is triggered.

Indeed we were configuring our device size to 0 while specifying a non-zero address.

Detect this condition and return an error early - as soon as we configure the registers (which, according to the data sheet, should be enough to raise the flag)

Also document this behavior on the respective TransferConfig and Config fields.

Testing
-------
See https://github.com/goodhoko/spi-error-test/blob/main/src/main.rs
</pre>
</div>
</content>
</entry>
<entry>
<title>Unify derivation of Clone, Copy and defmt::format for all *SPI configs</title>
<updated>2025-09-15T22:37:00+00:00</updated>
<author>
<name>goodhoko</name>
<email>goodhoko@gmail.com</email>
</author>
<published>2025-09-15T22:23:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy/commit/?id=542ae72ca77f3af95ff0b2a62e1110728e72053d'/>
<id>542ae72ca77f3af95ff0b2a62e1110728e72053d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Set the alternate bytes register to the correct value when configuring an Ospi command</title>
<updated>2025-09-12T15:13:44+00:00</updated>
<author>
<name>Brian Schwind</name>
<email>brianmschwind@gmail.com</email>
</author>
<published>2025-09-12T11:02:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy/commit/?id=9c4df75940023456e92623700a9bb25fe6600196'/>
<id>9c4df75940023456e92623700a9bb25fe6600196</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
