yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
MSPM0G3507 Development Board📖
1. Introduction to MSPM0
  • 1. Introduction to MSPM0
2. Development environment construction
  • 01.CCS Theia Development
  • 02.MDK Arm Development
  • 03.UniFlash Downloader
  • 04.DAP-LINK download program
  • 05.Program simulation and debugging
  • 06.Engineering transplantation
3. Keil basic case
  • 1. Turn on the LED light
  • 2. System delay
  • 3. Button control
  • 4. External interruption
  • 5. Serial communication
  • 6. Timer
  • 7. PWM breathing light
  • 8. ADC acquisition
  • 9. DMA transfer
  • 10. Get MPU6050 data (I2C)
  • 11. LCD Display (SPI)
4. CCS basic case
  • 1. Turn on the LED light
  • 2. System delay
  • 3. Button control
  • 4. External interruption
  • 5. Serial communication
  • 6. Timer
  • 7. PWM breathing light
  • 8. ADC acquisition
  • 9. DMA transfer
  • 10. Get MPU6050 data (I2C)
  • 11. LCD Display (SPI)
5. MSPM0 Robot Expansion Board
  • 1. MSPM0 Robot Expansion Board Introduction
  • 2. Custom Buttons
  • 3. Drive Buzzer
6.MSPM0-K230 Vision Application Module
  • 1.k230 color recognition
  • 2.k230 barcode recognition
  • 3.k230 QR code recognition
  • 4.k230Apriltag code recognition
  • 5.k230DM code recognition
  • 6.k230 face detection
  • 7.k230 gaze direction
  • 8.k230 face recognition
  • 9.k230 human body detection
  • 10.k230 fall detection
  • 11.k230 palm detection
  • 12.k230 gesture recognition
  • 13.k230OCR character recognition
  • 14.k230 object detection
  • 15.k230 target tracking
  • 16.k230 self-learning object recognition
  • 17.k230 license plate recognition
7. MSPM0-K210Vision module application
  • 0.Prerequisites for K210 as a coprocessor
  • 1.MSPM0_K210 color recognition
  • 2.MSPM0_K210 barcode recognition
  • 3.MSPM0_K210 QR code recognition
  • 4.MSPM0_K210 mechanical code recognition
  • 5.MSPM0_K210 face detection
  • 6.MSPM0_K210 facial feature detection
  • 7.MSPM0_K210 mask detection
  • 8.MSPM0_K210 face recognition
  • 9.MSPM0_K210 Object Detection
  • 10.MSPM0_K210 Self-study classification
  • 11.MSPM0_K210 handwritten digit recognition
8. Expansion casenew
  • 1.Autonomous driving car
  • 2.Vehicle-mounted balance ball motion control system
Download
  • Code
  • Hareware_Info
  • Software_Tools
  • Communication Protocol
Download ZIP

Welcome to MSPM0G3507 Development Board repository

3. Drive Buzzer

Drive Buzzer

1. Hardware Connection

This case uses the MSPM0 Robot Expansion Board. The peripherals used do not require additional wiring. Simply insert the Yahboom MSPM0G3507 core board into the expansion board.

2. Code Explanation

  • empty.c
int main(void)
{
    USART_Init();
    
    PWM_Buzzer_Init();
    while (1)
    {
        Buzzer_Toggle();
        delay_ms(1000);
    }
}
  • PWM_Buzzer_Init: Start PWM timer, used to drive the buzzer.
  • Buzzer_Toggle: Buzzer on/off toggle, set here to beep for one second, then stop for one second.

 

  • buzzer.c
​x
void PWM_Buzzer_Init(void) {
    DL_Timer_startCounter(BUZZER_INST);
}
​
void Buzzer_Toggle(void)
{
    static int i=0;
    if(i==0)
    {
        Buzzer_ON();
        i=1;
    }
    else
    {
        Buzzer_OFF();
        i=0;
    }
}
​
void Buzzer_ON(void)
{
    DL_TimerA_setCaptureCompareValue(BUZZER_INST, 30, GPIO_BUZZER_C3_IDX);
}
​
void Buzzer_OFF(void)
{
    DL_TimerA_setCaptureCompareValue(BUZZER_INST, 0, GPIO_BUZZER_C3_IDX);
}
  • Buzzer_ON: Adjust the buzzer volume by setting a certain PWM duty cycle
  • Buzzer_OFF: Set the PWM duty cycle to 0, the buzzer will not sound

 

3. Program Phenomenon

After burning the program and pressing the NRST key to reset, you can hear the buzzer on the expansion board beep for one second, then stop for one second, repeating this pattern.

Custom Buttons
k230 color recognition

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文