Making SDHC work for the use of a filesystem on the NXP MIMXRT1020 EVK #33341
Replies: 3 comments 2 replies
-
Please have a look at #35303 |
Beta Was this translation helpful? Give feedback.
0 replies
-
@awfulwaffle77, did the PR Maureen referenced help you? |
Beta Was this translation helpful? Give feedback.
2 replies
-
As pointed out, SDHC support was added for the MIMXRT1020-EVK with merged PR #35303. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to use Zephyr on an NXP MXRT1020.
My problem is pretty simple. I would like to add a C/C++ program to the NXP MIMXRT1020 EVK that classifies some traffic signs. The issue here is that for a neural network to work, I need some files containg the model and some other stuff. The need of files raises the issue of needing a filesystem which Zephyr does not support on the MIMXRT1020 EVK. So I've tought of writing my own SDHC "driver" to help me with this issue and maybe also help the community for that matter. I've tought of embedding the model in the program, but many of the functions of the library I tried to use (opencv cnn classifier and Shark) use functions that require opening files, so it was either modifying those or Zephyr.
I've posted a week ago this post which asked about how to basically write (some kind of) a driver for the NXP MIMXRT1020 EVK so that I can use the SDHC to compile the fat filesystem sample. I am really new to this so I would love if you could help me out a bit as some of you did already.
What I've tried
Following the hints from the Reddit post, I've tried copying the sdhc from the 1060 dts. I've read the 1060 reference manual and understood that the 1060
cd-gpios
references to a pad that has aUSDHC1_CD_B
, so the 1020cd-gpios
should correspond toGPIO1_IO26
, that corresponds to the padGPIO_AD_B1_10
(I've seen that there are multiple pads that allowUSDHC1_CD_B
, but this was the first one I found). I did not understand how theGPIO1_IO05
on the 1060 corresponds topwr-gpios
so I have not modified it yet. Maybe you could help me with this. I've written in the 1020 dts the following lines:I tought that was all, but the
west build -b mimxrt1020_evk /samples/subsys/fs/fat_fs
resulted in some linking error where I also need help with. After some fiddling with the repo I understood that the task was not that simple and that I had to modify other files, so I went to 1020 pinmux.c and tried to add theimxrt1060_evk_usdhc_pinmux
function from the 1060 pinmux.c, modified a bit, as such:I am not sure what the adresses(I suppose) in the
IOMUXC_SetPinConfig
are supposed to point to, as I've not found any of them in the 1060 reference manual. The GPIO2_IO28 from theIOMUXC_SetPinConfig(IOMUXC_GPIO_B1_12_GPIO2_IO28, 0x017089u)
points to anotherUSDHC1_CD_B
as shown in this image from the reference manual of the 1060. It it really confusing.Also, this resulted in the same linking error.
I have also tried building the application for the MIMXRT1024 and flash it to my 1020, but there is an error when running with error code
-5
that says theError mounting disk
.What I would love to get some help with
I would love if someone could help me find the documentation for this kind of stuff(I don't even know how to name it), understand what files I need to modify, help me with the linking error or any other hint. Do you recommend me posting this to somewhere else?
If you think of any other solution for solving my problem, I would also love to know!
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions