-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Issue with fat_fs example on nucleo_f767zi #35561
Comments
It could be SPI issue reported in #35539. |
Well there seems to be an issue related to the SPI interface as you suggested. As I am on Zephyr v2.5.0-965, running
Returns the following on the terminal,
For now I copied over the nucleo_f746zg.conf -> nucleo_f767zi.conf
This seems like a possible duplicate issue, I will post in the issue you mentioned to add to it. |
Do you want to run the spi_loopback test on the nucleo_f767zi ? There some adaptations to include:
|
Hi @FRASTM, I am an idiot, you deserve a coffee haha.
I thought the SPI was doing something internal, but connecting the pins had everything succeed with my original
But to add to what you asked me to do. I still did what you asked: 1,2,3,4, For step (3) I assume you meant to comment out,
I did try with and without this just in case. Doing those steps I get the following error message,
|
Did you use the stream for another DMA request (terminology is a bit confusing) ? |
Hi @FRASTM ,
Not to my knowledge? I am just using tests/drivers/spi/spi_loopback for now. So I just set what you asked me to set. Just making sure we are on the same page, looking at the datasheet for the STM32F767 these are the valid options, I tried all combinations. For Tx: Stream 5, Channel 3; Stream 3, Channel 3. For Rx: Stream 0, Channel 3; Stream 2, Channel 3. What I found worked was my original DCache issue. By adding
Which gives,
So aside from the DCache issue, the DMA+SPI works as excepted. However, I now need to go back to my original |
Not sure if you can help me here @FRASTM, so now that I know the SPI interface works as expected, I went back to the samples/subsys/fs/fat_fs project to ensure I can read the microSD card. Unfortunately, I wasn't able to have any luck. I tried trimming the board specific files I had to this, nucleo_f767zi.conf
nucleo_f767zi.overlay
Which mimic what the olimexino_stm32.dts (from the boards/arm/olimnexino_stm32), and olimexino_stm32.conf (from the fat_fs/boards). As well as the fat_fs/boards/nrf52840_blip.{conf,overlay} I am getting the following error now from running fat_fs,
Where I am back to square one. I am including on how I set up the pins on the board I routed. I do have a chip detect (CD) pin, but not using it at the moment. I am at a bit of a loss here on how to debug this. |
@ddkn Can you enable some log ? Also, please note that |
Hi @erwango, Sorry, I am not used to all of the options available. Here is the debug output,
I wasn't sure what you meant by remove it. So just in case I ran it 2 times, one with the Thanks again for helping. Edit: I also ran it with both options enabled as well. |
Ok, not much info here. What about CONFIG_SPI_LOG_LEVEL_BDG=y ? |
I have my own branch from 457a28b where I just ran The output of the SPI log is as such,
|
Moving issue to "low" as different from #35661 |
I wanted to update, I got the board working. I ended up changing out the microSD SPI+SDIO breakout board with a spare one I had. I may have a bad soldering job on my end or a faulty part, however, it works now. Here are the current config files I have to ensure this works, boards/nucleo_f767zi.overlay
boards/nucleo_f767zi.conf
serial output
Did you want me to do a pull request and add those in for the samples/subsys/fs/fat_fs app? |
@ddkn Thanks for the update. I'm gonna close the issue then.
Nice offer, but we generally limit upstream to the hw that's actually on boards. Otherwise we would be overwhelmed with overlays. |
@ddkn Thinking a bit more to it, what can be done is to port Adafruit microSD SPI+SDIO as a shield. So it can then benefit to all. Cf boards/shields/adafruit_winc1500 as example |
That is fair, haha. I will just post this on a blog or something in case someone needs it. I do appreciate all of the help!
I could try and look into this. For the SPI it was as direct as hooking up the pins. I would need to test out the SDIO stuff as well (but my school project has a small priority at the moment, hence the need for help). I could then just make port/shield like the adafruit_winc1500 as you suggest, if it is applicable. I can at least test it out on a Nucleo_{F103,F767,L152}. I have added it to my todo list. By then I will make a new issue or pull request once I have things sorted out. FYI, just got the read/write working! So I am quite happy now and can make some progress. |
Hello,
I believe this is something that may be obvious, but I cannot see the issue. I am trying to use the
samples/subsys/fs/fat_fs
project to read an SD card using thenucleo_f767zi
board with a Adafruit microSD SPI+SDIO board. I am hoping to just use the SPI interface, which should be supported by the nucleo. However, like others before me, #21899 and #27841, I am having no luck. I am attaching the relevant *.{conf,overlay} files that I am using with the sample project, below.Unfortunately, I do not have access to a logic analyzer to give some of the outputs for troubleshooting. Any advice or direction would be greatly appreciated!
Steps to reproduce the behavior:
west build -p auto -b boards/arm/nucleo_f767zi samples/subsys/fs/fat_fs
west flash
Expected behavior
I expect the contents of a MS-DOS FAT32 formatted microSD (SanDisk SDHC Ultra 32GB) to be displayed, which is just a
hello.txt
file.Impact
As I am trying to store ADC values on the SD card.
Configuration and additional files
I have hooked up the following pins,
boards/nucleo_f767zi.overlay
boards/nucleo_f767zi.conf
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: