8 bit to 16 bit conversion using DMA

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
WaMa_286156
Level 5
Level 5
First comment on blog 100 replies posted 50 replies posted

  I would like to convert and move 8 bit data in one SRAM buffer into 16 bit data in another SRAM buffer.  The data bytes can be twinned, as I will be interpolating using the Digital Filter Block later on.

   

  I have used DMA to move data from SRAM to Peripheral, and Peripheral to SRAM, but early on my attempts to move from SRAM to SRAM did nothing.  I'm sure I will figure it out now, since I *have* to. <grin>

   

  I would like to do this at as high a speed as possible.  I guess I could DMA into a register and then DMA out of a register; however,  PSOC only supports 8 bit registers.  

   

   Any suggestions?

   

  Thanks in advance!

0 Likes
1 Reply
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

wsm,

   

moving data with CPU will be faster. To use intermediate location for DMA transfer look at similar example by "pavloven"

   

http://www.cypress.com/comment/348136#comment-348136

   

 

   

I believe you can feed the Filter directly with 8-bit data, while shifting bit by using Filter Alignment (and Coherency) properties. Check e.g. this example

   

https://www.hackster.io/bmah/psoc-5lp-16-bit-and-24-bit-digital-filter-code-examples-ddcf9c?ref=part...

   

   

0 Likes