The previous function of reading a sector is using a 512 bytes buffer, by doing minor modifying on the tightest loop to write into a pointer instead of a buffer. The function can read from sector indefinitely (theoretically) using multi-block read. If a read is less than 512 bytes, it will perform a single-block read instead.

The next modification in the uploading bitstream is a bit tricky. First, the data from the Ethernet can be found in a Special Function Register named EDATA. This register does not require to increment it manually, it will automatically stores the next byte of data after it is read. With minor modifications, the tightest loop is modified by taking data directly from EDATA and write into the SD card.

A modification on the HTTP upload process is made to accurately calculate the size of data, this will help the program to determine how much data to write into the SD card.

The next step is to solve the issue where the connection will be timed out when uploading a larger file.


0 Comments

Leave a Reply

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