Trying to Write two SDCards at same time using SPI. MK20DX256VLL10

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Trying to Write two SDCards at same time using SPI. MK20DX256VLL10

58 Views
Pedro_Henrique
Contributor I

Hello, this is my first post here, please tell me if im doing something wrong. Also english is not my main language, sorry if i say something wrong.

I'm trying to write two SDCards at same time using SPI. Why at the same time? Because i need to do as fast as possible.

At the time im writing this, im able to copy 48Mb of hex numbers in 07:10 minutes, using 10Mhz in SPI clock. I use the functions generated by Processor Expert:

"SM*_ReceiveBlock(SM*_DeviceData, &Buffer, qnt*).

After gathering some logs with my logic, i noticed that even if i send:

SM2_ReceiveBlock(SM2_DeviceData, &Suporte, 1);
SM2_SendBlock(SM2_DeviceData, StartBlock, 1);
 
SM3_ReceiveBlock(SM3_DeviceData, &Suporte, 1);
SM3_SendBlock(SM3_DeviceData, StartBlock, 1);


The SPI sends first the SM2 and them SM3. If its the SPI machine who sends the blocks and handle the receiving, i should be able to make these two at same time, no?

Labels (1)
0 Kudos
Reply
0 Replies