-
Notifications
You must be signed in to change notification settings - Fork 9
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
SDMMC SD Card Drivers #45
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes mostly look good, especially if tested working.
I'm curious to see how it plays with freertos task scheduling and if that might cause problems with data stalling or weird interrupt issues. Might be worth trying to schedule two threads and having one thread write to the SD card while the other one does busy work?
…lib_reentrant for FREERTOS
390ec93
to
323f6f8
Compare
323f6f8
to
19ff31d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow! Having DMA and thread guard implemented is really cool. Very impressive! This pr is kinda large and couldn't finish reviewing it today. I will leave my approvement here since this code was tested to be working. Good work!
Description
What was completed, changed, or updated?
Why was this done (if applicable)?
Testing
What manual tests were used to validate the code?
Tested on 16 and 32 GB card
Can write the same message 100 times to a file
![Screenshot 2024-04-11 at 10 01 12 PM](https://private-user-images.githubusercontent.com/70457170/321832062-cd850e47-df1c-4c89-95f2-464323e17de8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxOTk5NDgsIm5iZiI6MTczOTE5OTY0OCwicGF0aCI6Ii83MDQ1NzE3MC8zMjE4MzIwNjItY2Q4NTBlNDctZGYxYy00Yzg5LTk1ZjItNDY0MzIzZTE3ZGU4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDE1MDA0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTkzZTQ4ZTU0ZjQzNzI2NGU1ZmFlM2MxZjNkYTA2YTJkZDk1YjcwMTZmYTRmZWMwNDQxYmJlYmFjMTY0MjU1ODYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.toldPoYzZGTDmmqW-q1kXM5D1j_vyDFmp0bvs_JuWeo)
Reading the first line, data matches as expected
![Screenshot 2024-04-11 at 10 00 06 PM](https://private-user-images.githubusercontent.com/70457170/321831936-847fa210-6aa1-4df7-ab67-74f8eab2cc21.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxOTk5NDgsIm5iZiI6MTczOTE5OTY0OCwicGF0aCI6Ii83MDQ1NzE3MC8zMjE4MzE5MzYtODQ3ZmEyMTAtNmFhMS00ZGY3LWFiNjctNzRmOGVhYjJjYzIxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDE1MDA0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI1ZDZiZmMyMmU1MTljOTA5ZjYxNDg3N2VmNTMxMTA5OWExZjA4ZGZlMTVkNTQwNzEzOTEzYmZmNDg4ODQ0NTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.MgKxO1n61I9qEZDcYdEMsUm2MCAkfOgv6eUz3b78GvM)
Multithreaded write to same file is handled correctly
![Screenshot 2024-05-30 at 11 53 18 PM](https://private-user-images.githubusercontent.com/70457170/335439885-549ca68f-bece-4e3a-9c70-621056996d8a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxOTk5NDgsIm5iZiI6MTczOTE5OTY0OCwicGF0aCI6Ii83MDQ1NzE3MC8zMzU0Mzk4ODUtNTQ5Y2E2OGYtYmVjZS00ZTNhLTljNzAtNjIxMDU2OTk2ZDhhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDE1MDA0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWExZTE3ZWM0MzFmYzNhMzAwNzhmZGEyNzJiZTg3Y2U0MGZlMzliNTgxYTUyMjNhNzRkYjE2Mzc5N2VlMjc1ZDEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.D_LGvr0v4WkHv0XGD_h_NcMGQ0PGitZXX7pGlGyMmwE)
What unit tests were used to validate the code?
Documentation
Milestone number and name: M2
Link to Asana task: https://app.asana.com/0/1203458353737758/1204645027312218/f
Link to Confluence documentation: https://uwarg-docs.atlassian.net/wiki/spaces/ZP/pages/2251620424/SDMMC+SD+Card
Reminders
Add reviewers to the PR
Mention the PR in the appropriate discord channel