Help finding the right MCU

I’m currently in the process of developing a wireless gaming mouse, I have the 3D modeling complete but I’m stuck looking for a usable MCU for a Pixart 3395 Optical Sensor. I have a NDA with Pixart If anyone could help I’d really appreciate it.
13 Replies
Petr Dvořák
Petr Dvořák15mo ago
Is the topic still alive, @techielew? If so, what has been your progress so far? I would go with some full-fat microcontroller for sure. My favourites are the usual suspects–RP2040 by Raspberry Pi and STM32F7x. I am pretty sure you would need a lot of memory and raw power. If interested, get back and we can discuss your project here.
techielew
techielewOP15mo ago
Thanks for getting back, Petr. The sensor outputs via 4-wire SPI so I'm navigating working with serial interfaces for the first time. But why a full fat MCU?
Petr Dvořák
Petr Dvořák15mo ago
Because you need to process image data–not a simple task and almost always quite memory demanding. When you need to process 100 frames per second, for instance, you need to keep previous frames in memory to detect movement. When speaking of the SPI interface. You need a DMA unit inside the MCU to transfer the data into the memory buffers. It means–forget AVR and almost all 8-bit microcontrollers. You must handle the USB bus simultaneously because you do not need lagging. It all led me to "full-fat" microcontrollers. By the term full-fat, I mean at least 72 MHz, ARM-CortexM4F or better.
techielew
techielewOP15mo ago
Yes, that's where my SPI issues are coming in. DMA is a new concept for me and I'm having trouble understanding how to send one sample at a time over SPI at my specified rate. I get my hardware (STM32F401, https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html) can flag when the buffer is half transferred or fully transferred, which is when to change pointers so the currently prepared half of the buffer is sent to DMA. But regarding the SPI transfer itself, how does the DMA 'know' how to send one sample at a time to the SPI peripheral at my specified rate (48khz)? Do I need another stream with its own flags within an ISR triggered by a hardware timer?
Petr Dvořák
Petr Dvořák15mo ago
Yes, you need another stream clocking your data rate. Do you work with the Library examples? If there is no such example, you can inspire yourself with I2S peripheral examples because there is a highly accurate timing used all the time.
techielew
techielewOP15mo ago
Thanks @Petr Dvořák, I do but do you have an example libraries you can suggest?
Petr Dvořák
Petr Dvořák15mo ago
Examples are a part of the HAL library package.
Petr Dvořák
Petr Dvořák15mo ago
No description
techielew
techielewOP15mo ago
Sorry I meant i2s peripheral examples
pallavaggarwal
pallavaggarwal12mo ago
let me know, we can discuss
pallavaggarwal
pallavaggarwal12mo ago
optical sensor need to be connected via GPIO? I2C?
pallavaggarwal
pallavaggarwal12mo ago
what all you need on the MCU?
Want results from more Discord servers?
Add your server