December 01, 2024, 01:41:59 PM

STM32-E407 / ARM beginner

Started by rcbuck, March 11, 2017, 03:16:51 AM

Previous topic - Next topic

rcbuck

I have used PICs in my designs for the last 20 years. I want to expand my knowledge by learning to use ARM microcontrollers. After a lot of research I have determined the STM32 series is the route I should take.

I am going to purchase the STM32-E407 board because I want to develop Ethernet applications after I learn the basics. I have previously used the PIC18F97J60 and PIC32MX795F512L for Ethernet applications.

I have a few questions about ARM and hope users here can give me some suggestions.

1) What tool chain setup would you recommend, considering I am using the STM32-E407 board? I only want to use free tools. I realize there will be a learning curve and probably some head bashing along the way with free tools.

My first project after blinking an LED and reading a switch, will be to try and get a web server running. With the Microchip parts you can more or less develop the website on a PC. They have a tool that you use to convert the web code to a binary format that the PIC understands when serving up pages. The binary file is then stored either in the PIC flash area or stored on an external device. Callback functions are used to handle input from the web page.

2) How are web pages handled on an ARM controller? Is everything for the site just put in with html code, text, and picture files?

3) If I have a web page with a button and a text box on it and I click the button, how does the button status update the text box? Is it handled with just a simple GET request?

4) I have discovered that apparently a lot of people use ChibiOS in their projects. Is a RTOS really needed for a web server? Or can it be handled with just state machine code?

5) Is there a web server example somewhere that I could program into the the board to initially test functionality? It appears the board does not come with any pre-loaded software.

Sorry for so many questions but I just learned how to spell ARM last week. ;) I now need to be pointed in the right direction, especially from a tool stand point.

JohnS

#1
A lot of those questions are not ARM-related (e.g. web server/HTML/HTTP ones).
(You can write the code any way you like.)

Maybe use an arm chip running Linux - can be a lot cheaper and does more than you mention.  (Also no need to write your own drivers etc.)

As a newbie, a Raspberry Pi is an easy place with many examples.  After that, maybe a Lime2 or such.

John

rcbuck

John,

I'll figure the web server/HTML/HTTP stuff out.

I have already worked with the Raspberry PI. I have used it to setup FreePBX and also played with the GPIO pins to read inputs and trigger outputs. I was a Linux Systems Engineer for 12 years in my real world job. The Raspberry PI is an expensive way to serve up a web page or to perform some simple I/O.

I want to work directly with the ARM chips as possible replacements for the PIC32 parts. For what I want to do, I believe a RTOS is overkill.

Can you make any tool chain recommendations?

JohnS

Any of the arm ones will do (usually gcc variants) but if you're going to use them without Linux and with direct port I/O you have to choose how you want to do that.  Decide if you want the vast numbers of (STM32-specific) #defines done for you and choose.

(As soon as you descend to the chip level you hit the issues of what the chip maker (rather than ARM) has done.)

Essentially, bypassing Linux means DIY a lot (and it's different by chip maker).

John

rcbuck

John, thanks for the info. Since I will be using the ST32 parts, I'll look at the System Workbench toolchain and maybe STM32CubeMX. If that doesn't work out, I'll take a look at ChibiOS.

I'll also pick up one of the Discovery boards to experiment with.

JohnS

Somewhat like with Microchip (and say PIC32) you'll be fairly well locked in by the vendor, which hopefully you're OK with.

As you've used the RPi you'll soon see what I mean and can decide if it's OK for you.

John

Lurch

As John mentioned, re-inventing the wheel can be tedious. I used the E407 with CrossWorks ($$) but changed to the free bare-metal IDE Em::Bitz because it's free. Was nice to discover how the lwIP stack works, but a lot of work.
For a simple web server you won't really need real-time performance, and setting up RTOS is not really much easier than polling in a loop. Not every process works well when it's interrupted.
Again, think about how much time you want to invest. I've since changed over to the ESP32 (ARM) modules, because the tools are free (from espressif) and the modules have WiFi, BlueTooth and possibly wired ethernet and cost less than the E407 - and are even faster. And have lots of examples for web server, udp, tcip etc.

JohnS

Is the ESP32 an ARM?  I thought not.

Not that it matters if using C / C++ / ...

John

Lurch