cancel
Showing results for 
Search instead for 
Did you mean: 

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

Luc T
Associate II
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
7 REPLIES 7
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
Up vote any posts that you find helpful, it shows what's working..
Luc T
Associate II
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

Luc T
Associate II
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.

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
Up vote any posts that you find helpful, it shows what's working..
Posted on February 10, 2018 at 23:40

Hi Clive,

can you help me further with this challenge?

Best regards,

Luc

Posted on February 11, 2018 at 00:51

>>

can you help me further with this challenge?

Depends a lot if there are prizes for participation, or not.

The H7 is perhaps overkill for the task, but the SDMMC should be able to pull data patterns and continuously drive the signals at these sorts of rates. The output method would depend on who is driving the CK, and the mechanics of the SDI1 vs SDI2 timing.

No stock of H7-NUCLEO144's this side of the Atlantic.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on February 11, 2018 at 11:05

I'm using now a nucleo-F767zi. I have ordered a nucleo-H743zi at RS online. It will shipped end of Feb.

An encoder signal with a product detect will be connected to the nucleo. 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 bits transfer.

The idea is to make a program in visual studio to convert a bitmap to the right format. Copy the converted bitmap to the nucleo and send the data to the printhead.

How would you do the transfer to the printhead?