-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This branch adds an initial implementation of a driver for the Fujitsu MB85xx series of ferroelectric RAM (FRAM) devices, as seen in Power Shelf Controller rev C boards. The FRAM chip is a SPI device with a fairly simple protocol, detailed in [the Fujitsu datasheet][1]. It also has additional pins for toggling the write protection feature (which can also be controlled over SPI) and a "hold" pin to maintain a read/write transaction when CS is deasserted, but my driver doesn't currently use those pins because we don't *really* need them. I've also included a simple demo task which writes some data to a FRAM device and checks whether it can be read back. Eventually, I'd like to replace this with a more general-purpose "read the contents of the FRAM" task that can be used for debugging purposes, but I've left it as is for now in the interests of getting the driver implementation ready to merge. I'll revisit this later. [1]: https://www.mouser.com/datasheet/2/1113/MB85RS64T_DS501_00051_2v0_E-2329177.pdf
- Loading branch information
Showing
9 changed files
with
581 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
name = "psc-c-dev" | ||
inherit = ["rev-c.toml", "dev.toml"] | ||
|
||
[tasks.framulator] | ||
name = "task-framulator" | ||
priority = 5 | ||
start = true | ||
task-slots = [{spi_driver = "spi2_driver"}] | ||
stacksize = 2048 | ||
notifications = ["hey-you"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[package] | ||
name = "drv-mb85rsxx-fram" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
bitflags = { workspace = true } | ||
|
||
drv-spi-api = { path = "../spi-api" } | ||
counters = { path = "../../lib/counters" } | ||
|
||
[lints] | ||
workspace = true | ||
|
||
# This section is here to discourage RLS/rust-analyzer from doing test builds, | ||
# since test builds don't work for cross compilation. | ||
[lib] | ||
test = false | ||
doctest = false | ||
bench = false |
Oops, something went wrong.