Jul 10, 2017
05:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 10, 2017
05:37 AM
Hi,
I'm trying to read the input from an SPI interface trough GPDMA to the memory of an XMC4800.
In detail:
With a high PWM interrupt frequency (PWM > 750kHz) I'm sampling the SPI interface.
On every interrupt when the frame length of the SPI input is reached (18bit), I want to shift the SPI FIFO to the memory over the GPDMA.
In the attachment file there are some details about the protocol:
Channel 0: PWM Interrupt pin --> ADC starts convertsation at high edge
Channel 1: MOSI
Channel 2: CLK (about 72MHz)
Channel 3; MISO --> Data from ADC 18bit
How do I achieve this?
Some GPDMA example for Dave 4 (peripheral to peripheral , memory to peripheral and vice versa) would help alot.
Thanks
Patrick
I'm trying to read the input from an SPI interface trough GPDMA to the memory of an XMC4800.
In detail:
With a high PWM interrupt frequency (PWM > 750kHz) I'm sampling the SPI interface.
On every interrupt when the frame length of the SPI input is reached (18bit), I want to shift the SPI FIFO to the memory over the GPDMA.
In the attachment file there are some details about the protocol:
Channel 0: PWM Interrupt pin --> ADC starts convertsation at high edge
Channel 1: MOSI
Channel 2: CLK (about 72MHz)
Channel 3; MISO --> Data from ADC 18bit
How do I achieve this?
Some GPDMA example for Dave 4 (peripheral to peripheral , memory to peripheral and vice versa) would help alot.
Thanks
Patrick
- Tags:
- IFX
2 Replies
Attachments are accessible only for community members.
Aug 08, 2017
08:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 08, 2017
08:28 AM
Hi,
Find attached an example.
The examples uses a double buffer that will allow you to process the ADC results while others are being gathered.
For that the DMA is configured using a linked list.
The SPI frame length is setup to 18bits.
The receive events are used as triggers for the DMA.
Regards,
Jesus
Find attached an example.
The examples uses a double buffer that will allow you to process the ADC results while others are being gathered.
For that the DMA is configured using a linked list.
The SPI frame length is setup to 18bits.
The receive events are used as triggers for the DMA.
Regards,
Jesus
Aug 22, 2017
03:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 22, 2017
03:40 AM
Hi,
Thanks for the files and information.
I have tested the application.
There is one problem, that the data is not sent at end of frame. It is sent at end of word as you can se en the screenshot.
Is there a way to change that?
Thanks
Patrick
Thanks for the files and information.
I have tested the application.
There is one problem, that the data is not sent at end of frame. It is sent at end of word as you can se en the screenshot.
Is there a way to change that?
Thanks
Patrick