Not applicable
Jul 26, 2016
02:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 26, 2016
02:25 PM
At the Dave Downloads page, there is a SDMMC example for the XMC4700
It works on the XMC4300 with a bit of wire. Led 1 is P4_0, the required port for DAT0, dropping a wire to the XMC43 side of LED1 gets you the DAT0, ports 3_5 & 3_6 are on the Arduino breakout pins.
Once hardware was setup, I followed the instructions provided in the readme_PDF, setting up the Dave APPS for UART and FATFS + SDMMC_0. I changed the pins to appropriate for my application, 1bit SDIO, used the built in Dave Init functions and shamelessly cut and pasted the main.c from the example code. I found some issues running. I kept getting error at execution of anything in the sdmmc struct that pointed to the sdmmc registers. It was pointed to NULL by the DAVE APP generation. Eventually I just replaced NULL with a pointer to the address of the register and she took off and I can write to SD. Is there a configuration I am missing that would allow it to find the register base by itself?
The register is the same XMC4300 to XMC4500 to XMC47/4800, always at 0x4801C000;
Line 160 of sdmmc_block_conf.c was
Replaced with:
Looking in the files provided with the example as I format this post, I see that line 223 of sdmmc_block_conf.c was
Which resolves to 0x4801C000. Again, my question is did I miss a step somewhere? Or could it be an APP issue since the example code has the XMC_SDMMC base address define?
It works on the XMC4300 with a bit of wire. Led 1 is P4_0, the required port for DAT0, dropping a wire to the XMC43 side of LED1 gets you the DAT0, ports 3_5 & 3_6 are on the Arduino breakout pins.
Once hardware was setup, I followed the instructions provided in the readme_PDF, setting up the Dave APPS for UART and FATFS + SDMMC_0. I changed the pins to appropriate for my application, 1bit SDIO, used the built in Dave Init functions and shamelessly cut and pasted the main.c from the example code. I found some issues running. I kept getting error at execution of anything in the sdmmc struct that pointed to the sdmmc registers. It was pointed to NULL by the DAVE APP generation. Eventually I just replaced NULL with a pointer to the address of the register and she took off and I can write to SD. Is there a configuration I am missing that would allow it to find the register base by itself?
The register is the same XMC4300 to XMC4500 to XMC47/4800, always at 0x4801C000;
Line 160 of sdmmc_block_conf.c was
.sdmmc = NULL, /* SDMMC instance */
Replaced with:
.sdmmc = (void *) 0x4801C000, /* SDMMC instance */
Looking in the files provided with the example as I format this post, I see that line 223 of sdmmc_block_conf.c was
.sdmmc = XMC_SDMMC, /* SDMMC instance */
Which resolves to 0x4801C000. Again, my question is did I miss a step somewhere? Or could it be an APP issue since the example code has the XMC_SDMMC base address define?
- Tags:
- IFX
- xmc4300 sdmmc
1 Reply
Jul 27, 2016
06:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 27, 2016
06:24 AM
HI jkennedy,
thank you for pointing this out. We identified this as a bug and it will be fixed as soon as possible. You already found a workaround which you can use until we fix the bug in DAVE APP generation.
Best regards
Deni
thank you for pointing this out. We identified this as a bug and it will be fixed as soon as possible. You already found a workaround which you can use until we fix the bug in DAVE APP generation.
Best regards
Deni