r/embedded • • Sep 24 '26

Microcontroller for teaching a DSP class

Hello all,
In a few months I will be teaching a DSP class that’s previously been taught with either an STM 32 disco board or Matlab depending on the semester. However I do not like the ARM curriculum and I want to ensure the students get to use a microcontroller. Does anyone have any advice for choosing a microcontroller that can easily handle basic digital signal processing?
As an additional note the students know the Arduino IDE and have Arduino R4 WiFi’s so keeping everything as similar as possible would be helpful. Thanks in advance for any help.

0 Upvotes

42 comments sorted by

28

u/samygiy Sep 24 '26

What do you mean by not liking ARM curriculum?

-10

u/real_magwhich Sep 24 '26

It gives students files to modify for labs rather than having them build things themselves. A big complaint we have had is that they want to do as much as possible from the ground up rather than having things handed over to be modified.

22

u/Hour_Analyst_7765 Sep 24 '26

Then don't use Arduino altogether... STM32 is actually perfect for this. You only need a linker file and minimal C(++) boilerplate for bss and data initialization. Raspberry Pico's are also great.

This is contrasted by ESP32 that has a huge clusterfuck called ESP-IDF, with a complicated component build system, committing all sins on an embedded system (e.g. malloc to store interrupt handlers for peripherals), and in my experience, insanely complex RTL which still translates to a borked HAL driver interface.

You could look at PlatformIO. It can still work with Arduino projects, but you can also use mbed or baremetal frameworks and basically have barely any support files... on both STM32 and RP2040. ARM is "the" standard CPU architecture today.

As for chips, I'm not sure how far you'll be stretching the term DSP as many modern ARM chips can do a fair amount of number crunching. STM32H7s are incredibly powerful and fast chips with double-floating point support, 500-600MHz clock speeds and very good peripherals (multiple ADCs , DACs, timers, DMA, memory, etc.)

Rp2350 could also be interesting simply because its homogenous dual core. You can have students split up processing tasks across two cores. In my university, our DSP classes featured a FPGA board with a 16-core NIOS processor cluster linked together in a ring bus. Every core was tediously slow, so that forced us to map algorithms over multiple cores and derive dataflow diagrams for them, along with WCET etc.

5

u/snowpaxz Sep 24 '26

I don't get what ESP32 is as hyped as it is, my experience has been very similar to yours. STM32 is a breath of fresh air by comparison

3

u/wavepark Sep 24 '26

I swear it's the default clanker recommendation

1

u/kempston_joystick Sep 28 '26

The esp32 (not Arduino) is based on FreeRTOS. The IDE is fine, the documentation is great. So it's a decent starting point for fairly low effort embedded C and C++ development.

I absolutely wouldn't use Arduino for college-level course though.

10

u/Electronic-Split-492 Sep 24 '26

Are you teaching signal processing algorithms or operating systems or computer architecture?

The sample projects have the environment all set up, usually with an OS configured, debugger settings, I/O peripherals (UART, display), etc. Asking the students to spend the first few weeks to do all this would be a waste of time if you want to teach them signal processing.

I would take a basic Hello World application and then have them implement the DSP portion themselves. They can start there and add code for their own FFTs, filters, etc.

16

u/PUzzleRocket Sep 24 '26

ur not ever forced to use template files when writing MCU code. You can always start from scratch if u really want.

That being said I’d recommend using ESP32 or Pico 2 and prohibiting the use of HAL. Writing directly to registers to configure GPIO is a good place to start, then eventually building their own SPI and I2C libs.

Edit:
ESP32 is RISCV
Pico is Arm

15

u/jappiedoedelzak Sep 24 '26

register based programming is a good place to learn microcontroller fundamentals. i dont know if using a ESP32 or Pico is the best place to start for register based programming though since there target audience is people that use the HAL. For register based programming i would suggest a basic stm32 or nxp MCU since they have better documentation on the register side. That said, OP is going to teach a DSP class and not a MCU class. So register based programming should generally be avoided here so they can keep there focus on the DSP part instead of getting a MCU to run.

2

u/FisionX Sep 25 '26

Not all ESP32 chips are RISC V, only the newer releases like the P4 and the C and H series are RISC V, I'd rather learn brainfuck than the original xtensa esp32 register programming

1

u/BanalMoniker Sep 25 '26

Pico 2 has both ARM and RISC-V (Hazard) cores.
It does take some effort to switch to the Hazard cores.

11

u/morto00x Sep 24 '26

As a minimum, something with Floating Point. For a college class, a Cortex-M4 would be more than enough to do the job. Also I don't know what you mean by ARM curriculum. It's a device. You choose how to teach it.

-4

u/real_magwhich Sep 24 '26

Arm puts out a curriculum that goes with the disco board I have on hand. If I’m going to start from zero anyway I’d like to know I’m going with a good device for the job.

3

u/1r0n_m6n Sep 25 '26

Then don't use ARM's curriculum and design yours.

2

u/morto00x Sep 24 '26

Like I said, any device will FP will do. STMicro and the likes just have good tools to make the process easier.

7

u/tonydelite Sep 24 '26 edited Sep 24 '26

A lot of modern microcontrollers use ARM. One of my favorite ones is the RP2350, but you can also use the RISC-V cores on it instead. I think newer ESP32s use RISC-V as well. Both can be used in the Arduino IDE.

Nothing wrong with ARM though.

-6

u/real_magwhich Sep 24 '26

I’ve been leaning toward the ESP32 due to the built in DAC. I just don’t have much experience with them so I’m getting second opinions.

4

u/wavepark Sep 24 '26

most MCUs have a DAC, though most are 8 or 12-bit so not really suitable for audio output. The ESP32 is not unique in this way(in fact, some variants in the esp32 don't have a DAC at all).

My understanding is that the esp32 stack is built on freeRTOS which might make anything involving hard real time requirements more difficult than it needs to be.

2

u/1r0n_m6n Sep 25 '26

You might want to consider interfacing your microcontroller with I2S ADC (or MEMS microphone) and DAC for a lab or a project. Your students will probably like applying their brand new signal processing knowledge to an audio application.

However, you should use a microcontroller they have studied in another relevant class. Talk to the teacher in charge to adequately plan your own lab, or even have him do it, with you providing the DSP part. It is completely unrealistic to add the burden of learning a new microcontroller to your DSP class.

1

u/zsaleeba Sep 25 '26

ESP32-S31 is a good fit for your needs, and there's a dev board "ESP32-S31-Function-CoreBoard-1" which has audio in/out. It also does Bluetooth, wifi, etc..

35

u/WaterFromYourFives Sep 24 '26

While I get your students feedback they need to remember this is a dsp class not a microprocessor class. Nothing wrong with using HAL. You can include a lab or module that forces you to implement from scratch and then compare against a HAL for example. I remember my dsp professor had a rule that said if you could write a faster fft than TI’s you automatically get an A in the class haha. One person succeeded and has worked for TI for a decade haha

8

u/wavepark Sep 24 '26

Not sure how deep you need to get with the math but the Electrosmith Daisy Seed might be worth looking at. It's an STM32H750 with a very nice audio codec, plenty of GPIO and a fairly well documented HAL that's oriented towards audio.

10

u/Several-Marsupial-27 Sep 24 '26

What the h... give your students the education they deserve and just use matlab or python for DSP and skip the microcontroller stuff to the embedded classes. If you want to showcase some embedded application you can do the systems in simulink, then realize it as c++ and flash to a microcontroller all in matlab.

6

u/Best-Leave6725 Sep 24 '26

This is the answer. Teach embedded systems and DSP separately, and then teaching them together is almost unnecessary.

6

u/Brilliant_Armadillo9 Hardware Engineer Sep 24 '26

Why not just use Python? Real time DSP on an embedded target has so many issues that are beyond the scope of DSP.

5

u/RelatableHuman Sep 24 '26

Exactly my thoughts... Embedded is not the place to learn DSP unless it's specifically an "Embedded DSP" class. OP needs to be more specific

3

u/xanthium_in Sep 24 '26

i have not used it but

TI has a couple of micro that could do signal processing for motor control and stuff.

C2000™ 32-bit MCU and the Piccolo series .They may come with a launchpad development board.

dsPIC series from Microchip https://www.microchip.com/en-us/products/microcontrollers/dspic-dscs

from their website

"dsPIC33 DSCs integrate the performance of a DSP for embedded applications that require time-critical response and the simplicity of an MCU. They offer low-latency interrupt response, fast Direct Memory Access (DMA) and a single-cycle Multiply Accumulate (MAC) instruction. The dsPIC33A family supports both 16- and 32-bit CPU instructions, which makes it an excellent option for math-intensive, high-performance and real-time control designs"

3

u/JohnThursday84 Sep 24 '26

Well, the thing is you have to decide. If you start bare-metal, first teaching how an embedded system works, you teach how digital hardware works.

But when the class is primarily about signal processing, it might overwhelm the students if they first require to understand how to program an MCU.

I mean at the end, what do you want to teach here? If it is all about signal processing, it doesn't matter how the internal buffer to be processed is filled. So, the approach using STM32 disco is actually fine.

4

u/Well-WhatHadHappened 25+ Years Sep 24 '26

It's a DSP class.... The obvious answer is dsPIC33

2

u/rautonkar86 Sep 24 '26

Switch to the Arduino R4 minima. It’s got the debugging header. Connect the EDU debugger from SEGGER. Then, you’re free to program the microcontroller however you want. Since it’s a Cortex-M4, you get some DSP instructions on it. ARM CMSIS DSP code should easily run.

2

u/MonMotha Sep 24 '26

Pretty much any modern Cortex-M7 SoC is basically a DSP with a more conventional pipeline. If you stick with well-known names, the documentatiom should be very good, and eval/dev boards should be available at reasonable prices with good stock. You don't have to use ARM's curriculum if you don't want to.

I've got more experience with the Freescale/NXP stuff and like it well.enough, but the STM32 is probably the most popular.

2

u/Embarrassed-Tea-1192 Sep 24 '26

Use the old TI DSPs, devkits are cheap, extremely well documented, and they’re probably the best platform to learn the fundamentals on

2

u/publishdraw Sep 26 '26

ARM is the industry standard, it will benefit students in the long run.

1

u/Such-Addendum-7421 Sep 24 '26

raspberry pi pico, stm32, and esp32 (for fun quick project)

1

u/somewhereAtC Sep 25 '26

You wouldn't be wrong to look at dsPIC33 products from Microchip. The search bar at microchip.com is now AI driven and can offer a lot of information.

https://www.microchip.com/en-us/search?q=dspic%20tutorial

1

u/No_Reference_2786 Sep 25 '26

Prepping your students on an ARM chip would be so beneficial to them , quite literally the industry runs on it right now. You’d do them a disservice by using an arduino unless it’s an arm based arduino at which point skip the ide

0

u/fb39ca4 friendship ended with C++ ❌; rust is my new friend ✅ Sep 26 '26 edited Sep 26 '26

Unless you are asking students to write assembly there's nothing microcontroller specific about DSP. I do think there is value in teaching using a low level language instead of MATLAB but you can run the exact same algorithms written in C/C++/Rust on a PC or a microcontroller. Making them do the entire class on a microcontroller is just going to be a distraction from the actual curriculum.

12

u/[deleted] Sep 24 '26

[removed] — view removed comment

4

u/sparqq Sep 24 '26

Fully agree, very weird responses for a teacher about to start a DSP course

1

u/imwalkingwithspiders Oct 06 '26

dude is asking for recommendations and you decide to be completely unhelpful and plain rude for what reason? to make your miserable day carry over to someone else? also the irony of trying to say someone has no knowledge when you can’t even use proper grammar 💀