This week I continued my attempt to establish a connection with the SD card. The first thing I did was to check the connection in the existing, and I found one of the pins was connected incorrectly, which is SDI2. The only option I found was to route it to pin 42, which is currently connected to location T3 of the FPGA. Also, pin RD10 acts as a switch which determines if a micro SD card has been physically connected, when unconnected the pin should be grounded.

After failing to initialize the SD card using the SD card driver functions, I proceeded to try sending initialization commands manually. I tried to read the response from the card but was unsuccessful in getting the success response. As the SPI clock speed was reduced to 400kHz I was able to analyze it using Pulseview, and I found that the serial clock and data out was indeed working, and the data in pin was receiving a response although it was inconsistent.

Due to lack of time as my internship period was running out, I then proceeded to correct the network project during the weekend. The idea is to switch from a static IP to using DHCP, and then print out the result in a terminal. After working with the codes and studying it, I found that it was best to use a pointer to the string (char *) as an argument to the Write function, although the original demo code uses a char array, as it somehow causes the pic32mz board to print out weird characters instead. In my version of the code, I stored the IP address in a char array and then allocated a pointer with the appropriate size using calloc function, then assigned the pointer to the address of the char array. I got it to print out the IP address which was automatically assigned, and testing it shows that the IP address printed out was indeed correct.


0 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.