Skip to content
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

examples/dsc: add card detection via FS automount driver #536

Merged
merged 2 commits into from Jan 18, 2023

Conversation

pkarashchenko
Copy link
Contributor

No description provided.

Merge develop into master for v2.6.0 release
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
*
* Description:
* Finalize file utility
****************************************************************************/

void futil_finalize(void)
void file_finalize(void)
{
sem_destroy(&g_sem);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if now g_sem is needed at all with FS automounter.

@SPRESENSE
Copy link
Collaborator

@pkarashchenko Thanks for your contribution.
I have been trying out your changes apache/nuttx#7584 and have noticed two things.

$ . /tools/configure.sh spresense:nsh_automount

  1. The startup seems slower until the nsh prompt appears.
    Fast boot time is an important performance feature for Spresense,
    Do you have the same symptoms on your side?

  2. SD card mount fails.
    First, turn on the power without an SD card inserted.
    Next, insert the SD card. After that, it can not mount properly.
    When the SD card is removed and inserted again, it is mounted correctly.

Could you please check these issues?
If needed, I will submit these issues to apache/nuttx?

@pkarashchenko
Copy link
Contributor Author

Sure. Thank you for checking. I will take a look. One question from my side is how did you measure the time till the NSH prompt appears? Can that be easily noticed visually? Or you instrumented code and added some timestamp prints?

@pkarashchenko
Copy link
Contributor Author

@SPRESENSE also one question from my side: is it slower when there is no card during bootup or it does not depend if the card is inserted during boot or not?

@pkarashchenko
Copy link
Contributor Author

I was able to reproduce and fix both issues. My understanding of spresense PIO level was messed up so I spend few hours of educating myself via browsing the source code :)

@pkarashchenko
Copy link
Contributor Author

@SPRESENSE please try the new PR to NuttX mainline. I hope issues to be resolved. Anyway those improvements are mostly for the case when board boots with no SD card. When SD card is inserted or is in the slot during the boot process it still needs around a second to settle down and set Card State Stable bit.

@SPRESENSE
Copy link
Collaborator

@pkarashchenko san
I could confirm that these issues I reported before have been fixed. Thank you.
Could you please change the target branch to develop from master?
(Refer to CONTRIBUTING.md.)

@pkarashchenko pkarashchenko changed the base branch from master to develop January 16, 2023 09:53
@pkarashchenko
Copy link
Contributor Author

Done

@SPRESENSE
Copy link
Collaborator

@pkarashchenko san

I have checked this application with the latest NuttX, but it doesn't work well.

Regardless of whether CONFIG_FS_AUTOMOUNTER_DRIVER is enabled or not, the LCD display freezes when the SD card is removed or inserted.

After investigating the cause, I found that if I revert the following commits, it works correctly.

apache/nuttx@a81dd93

I will merge it because they have nothing to do with this PR.

Thanks.

@SPRESENSE SPRESENSE merged commit 8e845c7 into sonydevworld:develop Jan 18, 2023
@pkarashchenko
Copy link
Contributor Author

@SPRESENSE thank you. I made a test as you pointed out by copy example app and running it on top of example camera. But maybe it was before the PR that you specify. I added print in the place where automount signal is received by the app and it was working as expected. Let's follow-up to fix the other regression.

@pkarashchenko pkarashchenko deleted the fs_automount branch January 18, 2023 11:17
@pkarashchenko
Copy link
Contributor Author

@SPRESENSE are there any other apps that should be updated? I'm think of the path to get board callback removed from the NuttX repo. I think that some defconfigs should be updated to use automount now. I would appreciate if you can give me some high level overview on what are next steps.

@SPRESENSE SPRESENSE added this to the v3.0.0 milestone Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants