Electronics > Beginners

How far up the code stack should I start?

(1/2) > >>

set321go:
Looking to write a microcontroller application, I'm building a rowing computer so first version is usb, accelerometer, display, sd card. The general concept is read sensor data do some math and store it to memory & display it on screen. At some later time offload the data via usb. The SD card was a shortcut idea to avoid the usb data part on the initial go around. I'm planning to use an STM32F0 to start with. I have a SW background so I'm kinda struggling with the whole 'roll your own' approach for everything.

I'm pretty certain I need a bootloader as I want to flash firmware updates via usb. What are my options here? I found OpenBootloader but that was about it, is there anything else worth looking at?

I looked around for some kinda OS and came across the concept of RTOS, i think this is probably a bit to much for my needs but is there other maybe less heavy loop/scheduler type frameworks? (i'm hopefully searching for the wrong terms which is why i can't find much)

Domagoj T:
It would probably help if you told us what is the microcontroller supposed to do.

set321go:

--- Quote from: Domagoj T on May 07, 2019, 06:29:13 pm ---It would probably help if you told us what is the microcontroller supposed to do.

--- End quote ---

Good idea! Updated my post with some details.

Jeroen3:

--- Quote from: set321go on May 07, 2019, 06:13:16 pm ---Looking to write a microcontroller application, I'm building a rowing computer so first version is usb, accelerometer, display, sd card.
...
I'm planning to use an STM32F0 to start with.

I looked around for some kinda OS and came across the concept of RTOS, i think this is probably a bit to much for my needs but is there other maybe less heavy loop/scheduler type frameworks?

--- End quote ---
That a lot of things at once, for an F0... as a beginner... It you only have a text display, it's probably fine.

An RTOS can help you handle the concurrency of the above tasks. Otherwise you'd have to police yourself that the code doesn't wait somewhere too long and fix interrupt priorities. Which an RTOS can ease for you. But it can also complicate things when you still manage to do it wrong.

I've not been using ChibiOS for a while, but they used to be very much oriented around STM32 chips. You might even find compilable STM32F0 SD card examples, that'll ease your job a lot!

set321go:

--- Quote from: Jeroen3 on May 07, 2019, 08:04:05 pm ---
--- Quote from: set321go on May 07, 2019, 06:13:16 pm ---Looking to write a microcontroller application, I'm building a rowing computer so first version is usb, accelerometer, display, sd card.
...
I'm planning to use an STM32F0 to start with.

I looked around for some kinda OS and came across the concept of RTOS, i think this is probably a bit to much for my needs but is there other maybe less heavy loop/scheduler type frameworks?

--- End quote ---
That a lot of things at once, for an F0... as a beginner... It you only have a text display, it's probably fine.

An RTOS can help you handle the concurrency of the above tasks. Otherwise you'd have to police yourself that the code doesn't wait somewhere too long and fix interrupt priorities. Which an RTOS can ease for you. But it can also complicate things when you still manage to do it wrong.

I've not been using ChibiOS for a while, but they used to be very much oriented around STM32 chips. You might even find compilable STM32F0 SD card examples, that'll ease your job a lot!

--- End quote ---

Well i'm going to attack things in stages and I've already prototyped that setup out on an arduino mkr board.

1. Microcontroller talking to accelerometer using i2c
2. Add display text i2c
3. Add sd card data write over spi
4. usb... (not looking forward to this bit).

Is an RToS the right term? Or should i be looking for something else to help with interups and scheduling?

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod