Edge triggered DMA losing first byte

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

cross mob
lock attach
Attachments are accessible only for community members.
HuEl_264296
Level 5
Level 5
First like given 25 sign-ins First solution authored

 I want to create an SPI component which leaves a small gap between bytes. To achieve this, I am using edge triggered DMA to transfer bytes to the SPI component. A PWM component is used to create the edges. I can vary the PWM period to vary the inter-byte spacing.

   

 

   

It all works, except that the first byte is always missing! When I try to transfer the following bytes: {1,2,3,4,5,6,7,8} I see {2,3,4,5,6,7,8} come from the SPI component.

   

 

   

When I was using the usual level triggered DMA, I never saw this problem.  What am I doing wrong? Please see attached waveform.

   

 

   

Many thanks

   

Hugo

0 Likes
6 Replies
HuEl_264296
Level 5
Level 5
First like given 25 sign-ins First solution authored

 And here's the workspace bundle:

0 Likes
HuEl_264296
Level 5
Level 5
First like given 25 sign-ins First solution authored

 Let's try again ...

0 Likes
HuEl_264296
Level 5
Level 5
First like given 25 sign-ins First solution authored

 Argh! Why is this forum so bad? It won't let me post the workspace bundle.  I'll e-mail it to anyone who wants it.

   

Hugo

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Keep calm, you're not the only one here gnawing nails about the &$§$&!! forum software.

   

Use internet explorer or firefox to post the zip-file.

   

 

   

Bob

0 Likes
HuEl_264296
Level 5
Level 5
First like given 25 sign-ins First solution authored

OK, trying again with Firefox.

0 Likes
HuEl_264296
Level 5
Level 5
First like given 25 sign-ins First solution authored

Unbelievable. Still doesn't work!  Hello Cypress? Can you fix this terrible forum please? Everyone else's forums are at least two generations ahead. Even open-source forum software is better than this joke.

   

 

   

We should all just move to http://electronics.stackexchange.com/

   

Or to http://area51.stackexchange.com/proposals/50195/embedded-systems when it comes back.

   

 

   

I've uploaded the file to my Google Drive: 103-000-2006-01.cywrk.Archive02.zip

0 Likes