-
Notifications
You must be signed in to change notification settings - Fork 1
Tools/brendan msp spi mram #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
BrendanKelly84213
wants to merge
35
commits into
main_protected
Choose a base branch
from
tools/brendan-msp-spi-mram
base: main_protected
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or 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
WIP. Wanted to capture without breathing too hard on anything since last time we got something from the MRAM it only worked once
Seems to work every time! No Idea!
Easier to see on the logic analyzer
The first byte will always (?) be 0x00, so we just skip it
This allows us to use the same ISR to receive different lengths of bytes from the MRAM.
…ay rather than read_device_id
…r, writing to MRAM, reading, and reading device ID all works
I've had bad luck with uint32_t on the MSP in the past. I don't think it's officially supported Incrementing down returns the ID backwards for me, so increment up.
This way it shows up in the debugger
Just make naming a little more consistent and add some comments
Tried to replicate how the code looks in driverlib.h as much as possible MRAM_camelCase for MRAM function decleratiosn SPI_camelCase for SPI declerations
delaying cycles after didn't do anything because we had already exited the ISR
This makes it easier to use understand but mostly for comparing address values in error handling
This checks to make sure write memory protection doesn't get in the way of trying to write within a block of memory by reading the status register provided MRAM
Our MRAM supports bulk transfers (command + address + arbitrary bytes) for both read and write.
Implements MSP430 builtin hardware CRC as checksum
Reads back data we just wrote and validates the CRC
Just check the CRC immediately after writing. We can worry about packet structure later if at all.
Gotta redo this later it DOES NOT COMPILE!!
For now just stick this in the I2C.c file because it works and I'm getting hungry and tired and need to commit these changes
NOTE: really need to squash this before PR, not now though
Since we are abandoning this for this project
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description (tell us what you changes or added or removed please)
This is the driver for SPI communication with MRAM chip from MSP4305969. We have bigger priorities so these are just for future reference.
How to test (if any tests done)
Get an MRAM and MSP4305969 launchpad and wire correctly. If you want to test a sandbox project its in Tools/MSP_SPI_MRAM_DEMO
Checklist