-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
GIGA: SdFat Bench example fails to load and run correctly #24
Comments
@mjs513 and @facchinm - I thought I would try it out as I hacked up a faster version of the sdfat-beta for the zephyr code, I ran into the same issue: I got around that one for now by adding to the sketch:
After that one it ran into: __aeabi_ul2f
|
Started digging more - zephyr has it defined already Probably other ones are defined someplace else |
Decided to revisit this issue after updating the GIGA Overlay to include:
issue seems to have disappeared. Bench.ino sketch now compiles and runs - however something seems terribly wrong with the results
Compare this to https://forum.arduino.cc/t/sdfat-tests-on-giga-r1/1198629?_gl=1*1jrv1n0*_up*MQ..*_ga*NTg4NDU3NDkxLjE3MzYyOTA2ODY.*_ga_NEXN8H46L5*MTczNjI5MDY4Ni4xLjAuMTczNjI5MDY4Ni4wLjAuMTcwMTY4OTc4Mw.. which has
Hopefully someone can confirm its not an SPI issu |
Are you using the released version of SDFat or my updated version? It may not matter, but for some of the stuff I was playing with, I enabled Async SPI and needed to add: CONFIG_SPI_ASYNC=y If I remember correctly without using my version of SDFat, the code goes down the rabbit hole of only one byte read at a time. |
Interesting thing is that if I run @KurtE simple SPI test sketch: |
Test3 Using custom SPI sketch shows the same thing Believe @KurtE test is using DMA? Have to see if I pulled in the transfer16 changes |
I am pretty sure, I know what is going on .... Again.
The issue is, we call, things like: And if that config pointer is the same as the previous call, it does not check if anything within that config structure has I thought the code in endTrasaction whereit calls: spi_release(spi_dev, &config); ` |
@facchinm @mjs513 - I have a version of SPI, that is working now, in that it will actually change speeds. The issue is that if you send the same spi_config object to the SPI transfer operations, it sees that the pointer is the same as the previous call, and does not Not sure the best way to do so: But my current version has the context object (ctx) store in addition to the config pointer, I also noticed that there are two copies of the spi_context.h file, one in the zephyr project and one in the ArduinoCore-zephyr project in the variant. I edited both, but suspect the zephyr one is copied in...
Note: I changed the test sketch to output the high speed twice, so I could check to see if it caught that it was same...
And LA shows obvious place where speed changed. I also verified that the picture viewer sketch was seeing the updated speed as well |
Follow on, in case we don't want to update the zephyr project to fix this. Another approach I was considering is to do it all within the SPI object. Sort of expand on the fix for 8 bit and 16 bit writes. Have two config objects, and any time we change something, like speed or 8/16 bit output. We swap which of the two |
If I am reading the code correctly, I am assuming that the possible SPI speeds are:
|
Even stranger ran it at several clock (bench.ino)
other speeds:
Looks like if you want better performance probably have to do your custom spi route |
@KurtE - @facchinm
Note: in bench.ino commented out Freestack calls, using Kurt's SPI setClock changes and the open pr incorporated |
Describe the bug
Using the SdFat Bench example the sketch compiles and seems to load however it hangs the sketch.
Output of Serial Monitor
Tried adding the symbol to llext_exports.c however I receive a build error on sbrk:
Is there a complier option that needs to be set versus adding it to llext_esports.c?
The text was updated successfully, but these errors were encountered: