Skip to content

disha-chavan/embedded-code-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

embedded-code-playground

The project focuses on incremental microcontroller bring‑up, with each commit adding and validating a new peripheral or module.

Embedded Code Playground – LP‑MSPM0G3507

  1. Board Overview The LP‑MSPM0G3507 LaunchPad™ is a development board from Texas Instruments based on the MSPM0G3507, an 80 MHz Arm® Cortex‑M0+ microcontroller designed for general‑purpose and mixed‑signal embedded applications. The board is well‑suited for low‑level embedded learning, offering rich peripherals such as high‑speed ADCs, timers, PWM, communication interfaces, and CAN‑FD, while still keeping the architecture simple and beginner‑friendly. [ti.com], [docs.nordicsemi.com]

  2. Microcontroller Core & Memory MCU: MSPM0G3507 CPU Core: Arm Cortex‑M0+ Maximum Frequency: 80 MHz (PLL based) Flash: 128 KB with ECC SRAM: 32 KB (ECC / parity supported) The Cortex‑M0+ core provides a clean Harvard architecture with a simple NVIC, making it ideal for understanding:

startup code vector table handling register‑level interrupt configuration

[ti.com]

  1. Clock System (What You Can Explore) The MSPM0G3507 provides a flexible clock tree:

Internal system oscillator (4–32 MHz) PLL up to 80 MHz External high‑frequency crystal support 32.768 kHz low‑frequency crystal Independent low‑frequency oscillator for RTC and low‑power modes

This allows hands‑on learning of:

clock source switching PLL configuration peripheral clock gating low‑power clock domains

(Details: MSPM0 G‑Series Technical Reference Manual) [users.ece.utexas.edu]

  1. GPIO & Digital I/O

Up to 60 GPIO pins (package dependent) 5‑V tolerant I/Os Configurable drive strength External interrupt capability

Great for:

GPIO bring‑up from reset bit‑band / register masking practice EXTI configuration without HAL

[ti.com]

  1. Timers, PWM & Control The MSPM0G3507 provides a very rich timer subsystem:

Multiple general‑purpose 16‑bit timers Advanced control timers Up to 22 PWM channels Dead‑band insertion support Quadrature Encoder Interface (QEI) Windowed watchdog timers RTC with calendar and alarm modes

This enables learning:

basic timers periodic interrupts PWM generation motor‑control‑style timing watchdog behavior

[bing.com], [docs.nordicsemi.com]

  1. Analog Subsystem (Major Strength) One of the strongest learning aspects of this board:

2 × 12‑bit ADCs, up to 4 MSPS Simultaneous sampling Internal temperature sensor DAC (12‑bit, 1 MSPS) 3 Comparators 2 Zero‑drift op‑amps Internal shared voltage reference

You can explore:

polling vs DMA‑based ADC ADC trigger synchronization comparator interrupts op‑amp routing PWM‑ADC synchronization

[bing.com], [docs.nordicsemi.com]

  1. Communication Interfaces

UART (4 instances)

LIN, Manchester, IrDA supported

SPI (2 instances)

Up to 32 Mbps

I²C (2 instances)

Standard / FM+ modes

CAN‑FD (1 instance)

This is excellent for learning:

register‑level serial drivers interrupt vs polling comms automotive‑style CAN fundamentals

[ti.com]

  1. Board‑Level Features The LP‑MSPM0G3507 includes:

On‑board XDS110 debug probe EnergyTrace™ support RGB LED + user LEDs Push buttons Ambient light sensor Temperature sensor External buffer for high‑speed ADC testing 32.768 kHz and high‑frequency crystals

These features allow testing without extra hardware. [bing.com], [docs.nordicsemi.com]

  1. Development Philosophy (This Repository) This repository intentionally avoids:

HAL libraries SysConfig auto‑generated code

Instead, it focuses on:

direct register‑level programming reading datasheets & TRMs understanding reset behavior building drivers incrementally

Each peripheral is added step‑by‑step and committed separately.

  1. IDE & Toolchain (Register‑Level Friendly) ✅ Recommended Setup Editor:

Visual Studio Code

Compiler & Toolchain:

ARM GNU Toolchain (arm‑none‑eabi‑gcc)

Debugger:

On‑board XDS110 (via OpenOCD or gdb)

This setup keeps the build system transparent and IDE‑agnostic.

  1. Basic Build Flow (Bare‑Metal) Typical project structure: project/ ├─ linker.ld ├─ startup.s ├─ main.c ├─ gpio/ ├─ timer/ ├─ uart/ ├─ Makefile

Build Steps

Write startup code (vector table + reset handler) Compile with arm-none-eabi-gcc Link using custom linker script Flash using OpenOCD / xds110 Debug with arm-none-eabi-gdb

This process enforces understanding of:

memory map stack/heap placement reset flow interrupt vectors

(Exact register details reference the TRM) [users.ece.utexas.edu]

  1. What You Can Incrementally Implement Suggested module order:

Startup & linker GPIO + LED Timer interrupts UART (polling → interrupt) SPI ADC PWM Comparator CAN‑FD Low‑power modes

  1. Key References

MSPM0G350x Datasheet [ti.com] MSPM0 G‑Series Technical Reference Manual [users.ece.utexas.edu] LP‑MSPM0G3507 LaunchPad User Guide [bing.com]

✅ Why This Board Is Ideal for Learning

Clean Cortex‑M0+ architecture Rich peripheral set Minimal abstraction required Strong alignment with automotive & industrial MCUs

About

The project focuses on incremental microcontroller bring‑up, with each commit adding and validating a new peripheral or module.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors