2021-03-13 05:54 AM
The example "DAC_SignalGenerator" is not working as expected for me using a NUCLEO-WL55JC1 board. Using CubeIDE 1.6 with FW Pack 1.0
Using the on board button one should be able to switch between a triangle and a "escalator" waveform. While the triangle waveform works as expected the escalator waveform is not really recognizable and it just looks like a lot of noise.
I tried replacing the generation of the escalator with the code for the generation of a sine wave which worked on a stand alone project on the same board. Again, this didn't looked correctly but more interestingly when I observed the output with an oscilloscope it looked as if in the escalator resp. sine mode both signals were output superimposed to each other. The triangle was still very visible even in the Non-Triangle mode.
My first idea was, that potentially the generation of the triangle did not really stop and both waveforms are generated at the same time.
Could you please verify the escalator signal is working as expected?
2021-03-13 10:38 AM
I managed to get the sine wave output working by now (problem was DMA was only transferring chunks of byte not word). Nevertheless it can clearly be seen that the signal is not switched properly between the triangle and the sine, but the sine is combined with the triangle signal
I experimented with using HAL_DAC_Stop_DMA before the next call to HAL_DAC_Start_DMA() but that didn't work and the ErrorHandler was called.
Attached the current example.
Can somebody spot the mistake?
Also, ITM_SendChar via SWO/SWD doesn't work. Can someone see what I am missing for this to work?