WaveDAC8_StartEx() does not work without being previously Initialized.

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

cross mob
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

I wanted to use the WaveDAC8 component with different waveforms than originally configured.  To do this, the user needs to use the WaveDAC8_StartEx() function.

Issue:

I thought that I could straight-out replace the WaveDAC8_Start() with WaveDAC8_StartEx(wave1_ptr, wave1_sz, wave2_ptr, wave2_sz).

//    WaveDAC8_Start(); /* Start WaveDAC8  */

    WaveDAC8_StartEx(&WaveDAC8_wave1[WaveDAC8_WAVE1_LENGTH/2], WaveDAC8_WAVE1_LENGTH/2, WaveDAC8_wave2, WaveDAC8_WAVE2_LENGTH); /* Start WaveDAC8  */

This does not work!   The originally configured waveforms are used not the 'new' defined waveforms.

What does work as to execute the WaveDAC8_Start() first then WaveDAC8_StartEx() next :

    WaveDAC8_Start(); /* Start WaveDAC8  */

    WaveDAC8_Stop();     /* Stop before executing WaveDAC8_StartEx() */

    WaveDAC8_StartEx(&WaveDAC8_2_wave1[WaveDAC8_2_WAVE1_LENGTH/2], WaveDAC8_2_WAVE1_LENGTH/2, WaveDAC8_2_wave2, WaveDAC8_2_WAVE2_LENGTH); /* Start WaveDAC8  */

Reason:

This is because the WaveDAC8_StartEx() function is code as follows:

void WaveDAC8_StartEx(const uint8 * wavePtr1, uint16 sampleSize1, const uint8 * wavePtr2, uint16 sampleSize2)

{

     WaveDAC8_Wave1Setup(wavePtr1, sampleSize1);

     WaveDAC8_Wave2Setup(wavePtr2, sampleSize2);

     WaveDAC8_Start();   /* This Start() initializes with the original configuration waveforms if not previously initialized */

}

The datasheet only mentions about Stopping the WaveDAC8 before executing WaveDAC8_StartEx().   It makes NO mention about the WaveDAC8 being previously initialized.

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
1 Reply
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi Len,

Thanks for reporting the issue. I have taken necessary steps to get this documented.

Best Regards,
Vasanth

0 Likes