Skip to main content
Luc T
Associate II
February 8, 2018
Question

nucleo-h743zi transfer data from SD card to serial line at 20Mhz

  • February 8, 2018
  • 7 replies
  • 1656 views
Posted on February 08, 2018 at 11:43

Hi,

for a new project I have to transfer data from a SD card to a serial line SDI (1 GPIO line). The data has to be synchronized with a 20 Mhz clock CK. 

0690X00000609UyQAI.png

At certain times , controlled by an external encoder signal, a data block of 434 bits has to be transferred synchronous with the 20Mhz clock. The time between 2 data blocks is minimum 70uS.

Till now I have configured timers to make a 20Mhz clock, to read the encoder clock and to generate the start trigger with the 20Mhz clock for the 434 bits transfer.

In total I need 2 SDI lines. Each line needs different data (same format) and is shifted in time. (the second SDI line starts a few mS later compared to the first SDI line).

Now I'm struggling with how I have to transfer the data from the SD card to the serial line.

The format of the data inside the file on the SD card I can manipulate to the format best for this transfer.

Does someone has an idea how I can make this (DMA) data transfer from SD card to serial line?

Thanks,

Luc

#gpio #nucleo-h743zi #dma
This topic has been closed for replies.

7 replies

Tesla DeLorean
Guru
February 8, 2018
Posted on February 08, 2018 at 14:50

You'll likely have to transit the data through SRAM. The MicroSD card should be able to sustain 100 Mbps, so some head-room there.

What is the length of the data pattern?

434 bits suggests a 14-bit pattern, but is not divisible by 8

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Luc T
Luc TAuthor
Associate II
February 8, 2018
Posted on February 08, 2018 at 14:58

Hi Clive,

thank you for the fast reply!

The data pattern is 2 start bits and 108 x 4bit.

The serial data is used for a inkjet printhead. (4bit gray scale for each pixel).

Best regards,

Luc

Tesla DeLorean
Guru
February 8, 2018
Posted on February 08, 2018 at 17:13

Ok, but how many MB of data are you looking to push from the file to the print head?

The most practical way to send this data would be preformatted packets via SPI

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Luc T
Luc TAuthor
Associate II
February 10, 2018
Posted on February 10, 2018 at 23:40

Hi Clive,

can you help me further with this challenge?

Best regards,

Luc

Luc T
Luc TAuthor
Associate II
February 8, 2018
Posted on February 08, 2018 at 17:45

for each printline we need 3 x 434 bits for the even pixels (SDI1) and 3 x 434 bits for the odd pixels (second serial line SDI2)

A printline (pixel size) is 84.7µmeter. So 1MB is about 3200 lines of 84.7µ meter -> a picture lenght of 27cm.

Most of the print jobs are smaller than 27cm but some are 120cm long. So if possible about 5MB.