• 0
hearos

Pin assignment Problem - SD Card PMOD

Question

Posted (edited)

I'm trying to run the PMOD SD IP core on a Nexys 4 DDR, using simple drag and drop from the board tap. I also add a microblaze and an UARTlite for communication. I wish to run the SDK (autogenerated) example of the SD PMOD IP core.

image.thumb.png.b8dcf06c079289695d0eaad3e212d880.png

 

I have used the same approach with the OLED and several other PMOD and it worked out fine. But with the SD card it fails, I get these critical warnings. I am surprised there is a problem at all, since I only used the PmodSD IP core, written by Digilent. See below.

 

 

image.thumb.png.957bf54b07f26e1f2449d82f2e250a52.png

 

The file of concern below:

 

image.png.86e016ebe2b1073a0fae9967d03576ba.png

Thanks for any help!

 

 

 

Edited by hearos

Share this post


Link to post
Share on other sites

14 answers to this question

Recommended Posts

  • 1

Hi @hearos,

Here is a completed and verified Vivado 2018.3 Nexys 4 DDR SD card and OLEDrgb on JA project. The main.cc has not been altered to work with the OLEDrgb but the HW platform includes the needed libraries. I also added the the below code to the OLEDrgb.h file. You will need to incorporate the main.c from the OLEDrgb example into the main.cc.

on the top:

#ifdef __cplusplus
extern "C" {
#endif
 

and this to the end of it:

 

#ifdef __cplusplus
}
#endif

 

so the code will work with C++.

best regards,

Jon

Share this post


Link to post
Share on other sites
  • 1

Hi @hearos,

Are you using the SD card reader that is on the Nexys 4 DDR or a Pmod SD or Pmod MicroSD  on pmod port JA?

If you are trying to us the SD card reader on the Nexys 4 DDR then you will want to use the onboard Micro SD Slot under external memory on the board tab. I have attached a screen shot of this. 

If you are using a Pmod Sd or Pmod MicroSD on port JA you should not need a XDC to constrain these pins since the boards files along with the vivado library IP's configure this for you.

best regards,

Jon

Nexys4DDR_Onboard_SD.jpg

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)

Thank you @jpeyron for your answer. I tried using the on board SD and the external, none of them were working.

In the following set up I use a PmodOLEDrgb and a PmodSD (onboard config) IP block. The OLED IP works fine, when I add the SD IP, problems occur.

 

image.thumb.png.e84a3bd7246c3fff60734209f85cdc35.png

I validate te design:

 

image.thumb.png.b0b2782dda2dc373288eaf2c33d97e3b.png

Following warnings appear:

image.thumb.png.910a435c819c9e4a5bdefff625e50441.png

When I press generate Bitstream following critical warnings appear:

image.thumb.png.798923c26cbc824a0b4f7ff568344086.png

I use the hotfix-PmodOLED_RGB library:

 

image.thumb.png.1d60b9d4e829892acc9d3f265c190885.png

When I go check the files, for the working OLED and the not working SD I see that in the SD files the wrong board (arty instead of nexys-a7-100t) is set:

image.thumb.png.df2b13b576ea207b9231be3553bbaee9.png

So can I just change the lines in the files to make it work? Is it a problem in the hotfix library that Digilent needs to solve?

Thank you for your help!

 

 

Edited by hearos

Share this post


Link to post
Share on other sites
  • 0

@jpeyron if I ignore the critical warnings and generate the project and start SDK I will have problems making the board support package. See the screenshots below.

 

image.thumb.png.4f46aa802751b9410850a3e86623f81a.png

 

image.thumb.png.560b6c5d52e462c3122fbaeb9e47c76d.png

 

Interestingly the KYPD also has a wrong board setting as the SD IP (arty instead of nexys-a7-100t) but it will work in SDK. Thank you for your help.

 

 

 

 

Share this post


Link to post
Share on other sites
  • 0

I am still stuck at this problem. I got most of the modules (OLED, Encoder, KYPD, SRAM) I need working but the SD card. I tried both onboard and external, neither of them seems to work. Yet I need to be able to store larger amounts of data, bitmaps and sounds and so on.

Can anyone help?

Share this post


Link to post
Share on other sites
  • 0

Hi @hearos,

The critical warnings about the IP cores being created on a different board should be ignored. You should not be altering the project to eliminate these warnings. Doing this may be causing issues.

Have you made a vivado/sdk project using just the SD card?

What version of Vivado are you using?  I will verify the Pmod SD IP Core using that version of Vivado along with the Pmod OLEDrgb and the Nexys A7 100T.

best regards,

Jon

Share this post


Link to post
Share on other sites
  • 0

@jpeyron I use the SD card (onboard), uartlite, timer and interrupt controller (so that I can run freeRtos later). I use the newest IP library (hotfix OLEDrgb).

I use Vivado 2018.3 with a Nexys 4 DDR.

As mentioned above, with given configuration (without any additional xdc file nor changing anything else) I get the warnings (for pins 7 to 10):

[Common 17-69] Command failed: BOARD_PART_PIN cannot be assigned to more than one port ["/home/harris/EmbSys/nexys4/SDcard/SDcard.srcs/sources_1/bd/design_1/ip/design_1_PmodSD_0_0/design_1_PmodSD_0_0_board.xdc":7]

 

 

 

Share this post


Link to post
Share on other sites
  • 0

Hi @hearos,

I will have some bandwidth to make an sd card, pmod OLEDrgb, nexys 4 ddr, vivado 2018.3 project on Monday.

best regards,

Jon

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)

Hi @jpeyron

Thank you for the verified Project you posted above. SD card works now. I just had to adapt the paths (board files, and Pmod files) in the xilinx project file.

I still get the same warnings but they can be ignored. Seems like the SD card itself was not the problem, maybe the problem was with the memory (not enough space to store the program) or with the cache (in case the SD card needs these to work properly). I will make further investigations on the issue.

Nevertheless, thank you, with your help I got it working for the purpose I need it.

Best regards

Harris

Edited by hearos

Share this post


Link to post
Share on other sites
  • 0

Hi @hearos,

Glad to hear that you were able to get the linked project working.  I also added the extern code to the Pmod OLEDrgb.h file. You should only need to incorporate the needed code from the main.c of the Pmod OLEDrgb to get that portion of the project working as well. 

best regards,

Jon

Share this post


Link to post
Share on other sites
  • 0

@jpeyron

Dear Jon

I found that the ultimate problem was the mix of C and Cpp (the Pmod SD lib contains cpp files). The Block Design was configured correctly in Vivado, only the Make process didn't work properly. Using the Extern C commands (as you did explicitly mention in your post and implement in the project above) solves the problem.

So to use the freeRtos I added additional AXI timer and Interrupt Controller. Now there is a problem this way, it does only work when the main is a cpp-file (.cc). When one uses the FreeRtos OS Plattform configuration, the main will be a c-file (freertos_hello_world.c). When the main is renamed to freertos_hello_world.cc the message below occurs when trying to run the project.

So again a problem in the Make process. What would you suggest to do to solve the issue?

Best regards

Harris

 

Message:

**** Build of configuration Debug for project SD_Card_Rtos ****

Nothing to build for project SD_Card_Rtos

 

Share this post


Link to post
Share on other sites
  • 0

Hi @hearos,

I do not have much experience with FreeRTOS projects. I would suggest reaching out to FreeRTOS about how to deal with both c and cpp files.

best regards,

Jon

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now