Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


Make a simpel tone on Stm32F7

hi guys
Do Anybody have a simpel way to make a tone / a beep on the stm32f7 with the wm8994 on..

I try something with :
void hjhAudioInit()
{
BSP_AUDIO_OUT_Init(OUTPUT_DEVICE_AUTO, hjhVolume, I2S_AUDIOFREQ_16K);
BSP_AUDIO_OUT_SetAudioFrameSlot(CODEC_AUDIOFRAME_SLOT_02);
}
void hjhAudioTone(){
BSP_AUDIO_OUT_SetVolume(hjhVolume);

BSP_AUDIO_OUT_Play((uint16_t*)Sine550hz0,28);
}

But it do expect a DMA stream and my array are just an sinusial...

Please help with a hint ;o)

Hjalmar

HI

This one give me a tone, but it do not stop...it continue and the stm32f7 do frezee ........anybody with an idea ?

  1. include “stm32746g_discovery_audio.h”
  2. include “stm32f7xx_hal_sai.h”
  3. include “stm32f7xx_hal_i2s.h”
  4. include “main.h”
  5. include “GUI.h”
  6. include “DIALOG.h”
  7. include “WM.h”


//Sin table values
uint16_t Sine550hz128 = { 32767, 39811, 46526, 52597, 57741,
61717, 64340, 65486, 65102, 63207,
59888, 55301, 49660, 43230, 36310,
29224, 22304, 15874, 10233, 5646,
2327, 432, 48, 1194, 3817, 7793,
12937, 19008, 25723,
32767, 39811, 46526, 52597, 57741,
61717, 64340, 65486, 65102, 63207,
59888, 55301, 49660, 43230, 36310,
29224, 22304, 15874, 10233, 5646,
2327, 432, 48, 1194, 3817, 7793,
12937, 19008, 25723,
32767, 39811, 46526, 52597, 57741,
61717, 64340, 65486, 65102, 63207,
59888, 55301, 49660, 43230, 36310,
29224, 22304, 15874, 10233, 5646,
2327, 432, 48, 1194, 3817, 7793,
12937, 19008, 25723,
32767, 39811, 46526, 52597, 57741,
61717, 64340, 65486, 65102, 63207,
59888, 55301, 49660, 43230, 36310,
29224, 22304, 15874, 10233, 5646,
2327, 432, 48, 1194, 3817, 7793,
12937, 19008, 25723};

static __IO uint32_t hjhVolume = 35;


void hjhAudioInit()
{
BSP_AUDIO_OUT_Init(OUTPUT_DEVICE_BOTH, hjhVolume, I2S_AUDIOFREQ_8K);
BSP_AUDIO_OUT_SetAudioFrameSlot(CODEC_AUDIOFRAME_SLOT_02);
}
void hjhAudioTone(){
BSP_AUDIO_OUT_SetVolume(hjhVolume);
int res = BSP_AUDIO_OUT_Play((uint16_t*)&Sine550hz0,sizeof(Sine550hz));
GUI_DispDecAt(res, 0, 60,5);
}

void BSP_AUDIO_OUT_TransferComplete_CallBack()
{
BSP_AUDIO_OUT_Stop(CODEC_PDWN_SW);
}


HI

Forget to tell you that it is working very fine ;o)
Now i am playing with getting the DSP functions to work .....

Hjalmar


Hi biggrin

I’m acyually trying to do the same but with just one word per channel at a given time (interrupt) .
I think if you share your project it will be easyer for me to understand the whole thing.

Cheers.


Good day!
I start with STM32F4-DISCOVERY and CubeMX. First I write code that generate sinus using DMA and DAC.
This work good. Next I need to trancieve message throutgh USB when generation of sinus go.
CubeMX give USB_CDC library and I use it. Problem is when I create Transmit function and put it in main loop
generation of sinus not started but Tramsmit work properly.
What can you say about this?


 

Newest Forum Posts

  1. reservation car service Seattle by Jamesprede, 2025-05-01 10:06
  2. Last day: drone bonus by Danielrug, 2025-04-19 16:55
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Insightful Perspectives on This Subject by davidsycle, 2025-03-04 05:45
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  9. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  10. Build a project in "release" mode by tang, 2025-02-20 10:36

Last-Modified Blogs