XMC1000 TIP of the day: Result FIFO for ADC channel

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

cross mob
Not applicable
There are total of 16 result registers in each ADC group.
These result registers can be combine to build a result FIFO buffer for result registe.
A result FIFO stores several measurement from a channel and can be read out later by CPU.
And it is possible to set up more than one result FIFO for different ADC channel too.
2363.attach
The result register can be configured to FIFO by enable the FIFO function in GxRCRy.FEN.
More information can be found in the device Reference Manual.
0 Likes
1 Reply
lock attach
Attachments are accessible only for community members.
Eric1
Employee
Employee
Hi,

attached two examples for the ADC FIFO usage.

I use the ADC in queue mode to do 4 samples.
The ADC is triggered via a CCU_PWM Timer.

Unfortunatelly the FIFO does't provide a FIFO Full interrupt so there are some options:

A) Implement a SW counter and read after 4 interrupts all 4 register.
B) Use QUEUE mode add the channel 4 times and activate for the last element the source event.
C) Use a HW timer or HW counter to define when you sampled 4 times.

I attached 2 projects, one for A) and one for B).

One hint for B): the APP uscases requires a conditional callback function for the source event. This can be optimized after the application is finilized.

Best Regards
Eric
0 Likes