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

78000FTHR "Insert SD card to continue" Not identifying SD card #640

Closed
ryalberti opened this issue Jun 27, 2023 · 15 comments
Closed

78000FTHR "Insert SD card to continue" Not identifying SD card #640

ryalberti opened this issue Jun 27, 2023 · 15 comments

Comments

@ryalberti
Copy link

I am trying to run both SDHC_weights and facial_recognition on my MAX78000FTHR. I have checked that my Micro SD card is correctly formatted with FAT32 and empty before inserting it into the board with the metal contacts facing the board. When I build the projects, they receive no errors or warnings. When they are loaded, I receive the expected outputs waiting for the SD cards to be inserted. For SDHC, I have tested with two different empty micro SD cards without partitions. I have also tried facial_recognition with empty SD cards as well as with the weights_2.bin file in the root directory and received the same waiting prompt. I have tested this by having the SD card already inserted upon running and inserting the SD card after the program has begun. I have tested this two boards with the same results.

I see here that the MAX780000FTHR is not included in the SDHC usage although I know these programs are both ( 1, 2) specifically tested for this board. I am developing from the repo and not from the maintenance tool so I am up fully updated as of this morning, 6/27/2023. This leads me to believe there is a setting I have not changed or I am building somehow incorrectly. To build, I am simply running ‘ make -r -j ’ Are there any additional changes to make?

Thank you!

image

image

@Jake-Carter
Copy link
Contributor

Thanks @ryalberti

As part of our functional testing before release I have been tracking any issues in the fix/functional-tests branch.

Good catch in the UG, I added the MAX78000 to the list of SDHC supported parts (056b0e5)

On the example - you are building it correctly. The default build settings will work.

I was able to run the SDHC_Weights project, which formatted and wrote to the card.

***** MAX78000 Writes CNN weights to SD card *****
Card inserted
SD card mounted.
SD Card Opened
Opened file 'weights_2.bin'
176844 total bytes to write
3000 bytes written to file
3000 bytes written to file
...
3000 bytes written to file
2844 bytes written to file
176844 total bytes written to file
File Closed
SD Unmonted

Afterwards, I ran the facial_recognition project successfully.

D[main      : 103]

MAX78000 Feather Facial Recognition Demo

D[main      : 124] Camera I2C slave address is 3c

D[main      : 134] Camera Product ID is 7692

D[main      : 144] Camera Manufacture ID is 7fa2

Card inserted
SD card mounted.
SD Card Opened
D[facedetection: 158] CNN load data time : 25ms
D[facedetection: 170] CNN wait time : 19ms
D[facedetection: 158] CNN load data time : 24ms
D[facedetection: 170] CNN wait time : 19ms
D[facedetection: 158] CNN load data time : 25ms
D[facedetection: 170] CNN wait time : 19ms
D[facedetection: 158] CNN load data time : 25ms

So the example seems to be functional. Perhaps there is a difference in SD cards that we haven't caught. Below is the card I'm using. What is yours?

20230628_154404

@ryalberti
Copy link
Author

Hi Jake, attached are picture of the 3 micro sd cards tested. The two in the same picture were tested on the first board, the single sd card was tested on the second board.
sdcards1
sdcards2

@Jake-Carter
Copy link
Contributor

Thanks @ryalberti, looks like the 32GB capacity is the only major difference. I'll order some higher capacity cards to test

@ryalberti
Copy link
Author

Hi Jake, I found an 8GB which yielded the same results on my board.
sdcards3

@Jake-Carter
Copy link
Contributor

Thanks @ryalberti, we're testing across a wider range of cards to see if we can reproduce any failures.

Do you happen to have a second FTHR board to test with? Or are they all failing across the same one?

@ryalberti
Copy link
Author

I do have a second FTHR board I can test with. The second board used the above Micro Center sd and yielded the same issue, though it used the same build files as the first FTHR that tested the Samsung, SanDisk, and Netac.

@Jake-Carter
Copy link
Contributor

Can you zip up your .elf file and attach it? I'll test your binary on my working board

@Suraj-Ajjampur
Copy link
Contributor

Suraj-Ajjampur commented Jul 6, 2023

I just flashed a Sandisk Ultra Plus 32 GB micros SDHC card and was unable to reproduce the issue. This is similar to the SDHC card @ryalberti used.
image

I ran the facial_recognition project and I got the expected output.

D[main      : 103]

MAX78000 Feather Facial Recognition Demo

D[main      : 124] Camera I2C slave address is 3c

D[main      : 134] Camera Product ID is 7692

D[main      : 144] Camera Manufacture ID is 7fa2

Card inserted
SD card mounted.
SD Card Opened
D[facedetection: 158] CNN load data time : 25ms
D[facedetection: 170] CNN wait time : 19ms
D[facedetection: 158] CNN load data time : 24ms
D[facedetection: 170] CNN wait time : 19ms
D[facedetection: 158] CNN load data time : 25ms
D[facedetection: 170] CNN wait time : 19ms
D[facedetection: 158] CNN load data time : 25ms

@Suraj-Ajjampur
Copy link
Contributor

Try looking at the Updating the MAX32625PICO ("PICO") Debug Adapter Firmware section in this link

Also, these are the parameters I set before formatting the micro SDHC.
image

@ryalberti
Copy link
Author

I put the listed firmware onto the board and received the correct Git BASH, and copied your parameters when formatting my SD card. I still received the same results. Attached is my .elf from my computer.
max78000.zip

On the second board, we build the project from a previous build of the elf (though I have changed no values, I have updated the repo) and one build on another computer with the same update. I will be unable to test the above directions on the other board until tomorrow.

Thank you for your patience!

@ryalberti
Copy link
Author

I was able to test the second board this morning, flashing with the above settings yielded the same results. Attached is the .elf used for this board. The computer that built this .elf is not developing from the repo, it is using the official release.
max78000.zip

@Suraj-Ajjampur
Copy link
Contributor

I ran the above .elf file and I wasn't able to reproduce that issue.
I got the below output.

image

I think this might still be the way the SDHC is being formatted try running the SDHC_FTHR example (msdk/Examples/max78000/SDHC_FTHR) and select the Format option. Hope this helps.

@ryalberti
Copy link
Author

We tried on both boards and neither of them are detecting an SD card being inserted at all. The first board was testing using the SanDisk (32gb) and the Netac (8gb) and the second was using the same MicroCenter card. I was initially under the impression that if it was two boards, then it must have been a software issue. Does it appear that this is a hardware issue and we should be replacing the board?

image

@Jake-Carter
Copy link
Contributor

Given that flashing your binary on my board also works...

D[main      : 103]

MAX78000 Feather Facial Recognition Demo

D[main      : 124] Camera I2C slave address is 3c

D[main      : 134] Camera Product ID is 7692

D[main      : 144] Camera Manufacture ID is 7fa2

Card inserted
SD card mounted.
SD Card Opened
D[facedetection: 158] CNN load data time : 25ms
D[facedetection: 170] CNN wait time : 19ms
D[facedetection: 158] CNN load data time : 25ms
D[facedetection: 170] CNN wait time : 19ms
D[facedetection: 158] CNN load data time : 25ms
D[facedetection: 170] CNN wait time : 19ms
D[facedetection: 158] CNN load data time : 25ms
D[facedetection: 170] CNN wait time : 20ms
D[facedetection: 158] CNN load data time : 24ms
D[facedetection: 170] CNN wait time : 19ms
D[facedetection: 158] CNN load data time : 25ms

... this has the symptoms of a hardware issue.

  1. You've formatted your card with the same options as above
  2. You've flashed and run the SDHC_weights project on the card and that fails
  3. You've flashed and run the SDHC_FTHR example and that also fails
  4. I can run your same binary on my board and it works
  5. Multiple SD card sizes work on our side

The symptoms seem to indicate hardware-related failure on the SD card interface. It's shocking to me that both your boards have it. I've never seen this happen before, but I'm not sure what else to try.

Shoot me an email to jake.carter@analog.com with your shipping info and I'll see about getting you some tested FTHR boards asap.

@Jake-Carter
Copy link
Contributor

Hardware issue verified

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

No branches or pull requests

3 participants