2014-06-05 01:21 PM
Hello,
I want to transmit 10000 samples taken by adc continuously stored in an array. Is it possible the DMA-UART can transmit this to the PC while the CPU can take the next set of samples(independently) i.e without slowing the CPU. #fast-dma #stm-rocket-science2014-06-07 04:35 PM
Thanks Clive for the awesome example and all your effort. But by this for every element to be transferred the CPU need to intervene so it is kinda not an independent memory to peripheral transfer using DMA.
I have no problem transferring binary format of data block, I can convert that back to decimal on the PC's end. Hope I could explain this right ?RegardsSameer2014-06-08 04:36 AM
Correct, you could set up half your ADC DMA buffer to be sent at each HT and TC interrupt. The USART would send the lagging half of the buffer which you had just filled, while the ADC would continue to fill the other half.
You need to make sure the USART is sending the data quicker than the ADC is collecting it, and slow the ADC pacing if required.2014-06-09 10:58 PM
Hello Clive,
As u had suggested I am transmitting all data in raw form as binary, But I cannot find a concrete way to read binary data on my PC end. Can u please help me on that.RegardsSameer2014-06-10 05:14 AM
On the PC end you'd need to create an array of similar type and dimensions. You'd probably want to packetize the data, or use a preamble, so you can get byte and array level synchronization.
As all the other words are 12-bit ADC values, a preamble like 0xF8F8, 0xAA55 or 0x1234 would probably suffice, as they wouldn't naturally be in the byte stream.2014-06-10 11:07 AM
Hello Clive,
When I am transmitting my data over the UART. There I get a 8 bit (0xFF) value initially before valid data is sent which actually misalign my data. Do have any idea of why this is happening. something like this :11111111 10010110 00000000 10011010 00000010 RegardsSameer