DAC_LUT App settings

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

cross mob
michael_liao
Level 2
Level 2
First like received 5 replies posted 5 sign-ins

I am testing the XMC4700 by using Dave.

My settings are shown as below.

michael_liao_0-1677723820608.png

michael_liao_2-1677723947880.png

Reprtition is set as "cycles" and "3" times.

The "External trigger" is connect to a CCU4 slice.

But the DAC won't stop when the 3 times repetition of the LUT, and it act as endless repetition setting.

Do the settings incorrect?

 

 

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

If I use the internal trigger, and config the cycle to 3, it can stop after output 3 cycles. And I add my test project in attachment.

If you change your APP config, please generate the code again just like the below screenshot.

 

LinglingG_46_0-1677744550823.png

I think the difference between ccu4 trigger and internal is at the starting. After starting, then they are the same.

 

View solution in original post

0 Likes
6 Replies
lock attach
Attachments are accessible only for community members.
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

If I use the internal trigger, and config the cycle to 3, it can stop after output 3 cycles. And I add my test project in attachment.

If you change your APP config, please generate the code again just like the below screenshot.

 

LinglingG_46_0-1677744550823.png

I think the difference between ccu4 trigger and internal is at the starting. After starting, then they are the same.

 

0 Likes
lock attach
Attachments are accessible only for community members.

Hi @LinglingG_46 ,

Here is my test project.

Do you mean the DAC which is triggered by CCU4 slice should stop after 3 cycles?

0 Likes

Please test the project I attached in the previous response.

0 Likes

1: The first step, please open the dac_lut_conf.c in generated folder.

2: Please check the DAC_LUT_t DAC_LUT_0 ={}

LinglingG_46_0-1677746489594.png

3: The source reason is the red cycle what I choose.

4: How to solve the issue, click the red cycle in below figure:

LinglingG_46_1-1677746566170.png

 

5: After generate new codes, please check the config again to check if it can solve the issue.

6: Hope my answer can help you.

 

 

0 Likes
lock attach
Attachments are accessible only for community members.

Hi @LinglingG_46 ,

I found out why the DAC won't stop.

I re-registered the event handler in "main.c".

michael_liao_0-1677807871128.png

Here are the further more questions:

 

1.  I set the external trigger with DMA configuration as the pictures in the first post.

And auto start the CCU4 and DAC_LUT after initialization.

michael_liao_0-1677809084832.png

 

michael_liao_1-1677809146232.png

 

But the DAC didn't output waveforms.

I have to enable the DMA manually by calling the API "XMC_DMA_CH_Enable".

Is that normal?

 

2. I cannot enable the DMA again after I called the DMA disable API "XMC_DMA_CH_Disable" for the "Endless" configuration.

But why?

 

3. How can I restart the DAC after it stopped in the event handler for the "Cycles" configuration?

michael_liao_2-1677809548462.png

 

I've attach the simple example of my test.

Thanks.

0 Likes

1: I have reviewed your codes, but if you want to start after initialization. You only need to config use the " status = DAVE_Init(); /* Initialization of DAVE APPs */".

2: More about the DAC, you can refer to the application note:

https://www.infineon.com/dgdl/Infineon-DAC-XMC4000-AP32301-AN-v01_00-EN.pdf?fileId=5546d4624e765da50...

 

0 Likes