Showing posts with label STM32F4-Discovery. Show all posts
Showing posts with label STM32F4-Discovery. Show all posts

Sunday, March 30, 2014

Generate STM32 MCU pin configuration automatically on MCU

Building a project for STM32F4-Discovery I realized it's really hard to keep track of all the pins as they get configured in different files all over the project. It's either keeping a separate list of assignments and functions (maybe using STM's cube software) or just going through source files every time.

Or maybe just having MCU report how pins are configured?

Here's what I managed to get out of my STM32F407VGT6:
==============================
SMT32F407VG Configuration
------------------------------
PA0     Input           LOW,  NO_PULL
PA1     Input           LOW,  NO_PULL

Friday, March 29, 2013

Links to USB resources on STM website

I think my older post Some resources for STM32 USB device programmers no longer represents how I look at USB firmware development for STM32, so...

This is just a list of links to USB resources on STM website. I'll use it as a reference for myself, so this post will be updated. The need for me to create this post is because STM finally succeeded in their quest to make any info unsearchable on their website.
If you think anything is missing, please let me know.
I'll split this by Discovery boards, F3 and F4, so apologies in advance.

Thursday, March 21, 2013

STM32 tools: New MicroXplorer generates the STM32 pinout initialization code

While I'm still very angry with STM for what they've done to all the community efforts by breaking, again, all the links on their *new* website rendering all our howtos to useless texts, here's a piece of *presumably* great news: MicroXplorer now is able to generate code. I haven't tried it though yet, so be the first to give it a go and describe your experience.

Tuesday, November 13, 2012

Some resources for STM32 USB device programmers


UPDATE: I will collect direct links to libraries and manuals here on this post: 

Links to USB resources on STM website



Well, some of the some are not for STM32 only.

First and the best I found this tutorial - "USB in a nutshell". I just started reading it, but it lloks like it's a must for a starter like me. Check this out:

Endpoints
Endpoints can be described as sources or sinks of data. As the bus is host centric, endpoints occur at the end of the communications channel at the USB function. At the software layer, your device driver may send a packet to your devices EP1 for example. As the data is flowing out from the host, it will end up in the EP1 OUT buffer. Your firmware will then at its leisure read this data. If it wants to return data, the function cannot simply write to the bus as the bus is controlled by the host. Therefore it writes data to EP1 IN which sits in the buffer until such time when the host sends a IN packet to that endpoint requesting the data. Endpoints can also be seen as the interface between the hardware of the function device and the firmware running on the function device.
All devices must support endpoint zero. This is the endpoint which receives all of the devices control and status requests during enumeration and throughout the duration while the device is operational on the bus.

Isn't that crisp and clear?

Ok, going further. If you play with STM32F4-Discovery like I do, it may be a pain in the neck to find a helpful resource. E.g. you can't find USB OTG library from the board's page. You can't find it through web search either. You can't even find it with search on www.st.com website. Geee, I almost gave up on this.

Here's how to find it. Go to main page (their main page!), click "Micros and Memories", click "Microcontrollers", click "STM32 - 32 bit ARM Cortex MCU", switch to "Resources" tab, Click "Firmware" and look for "STM32F105/7, STM32F2 and STM32F4 USB on-the-go Host and device library" (the link will soon be broken - best practices from ST. Really, guys - your Digital Marketing department suck. Try to find this library with the search on your own site!).

There's even manual for this library (and a good one. I think...). I have no idea how to find it on ST website, but this time google is very useful. Here's a direct link to UM1021 User Manual.
And the last thing is HID Demonstrator. I don't know what is that exactly, I just know that this is useful and I soon will need this. So may you. Thus, a step back in resources and click "Drivers". Look for "USB HID Demonstrator release 1.0.2"

Go read guys. It's gonna take you a LOOOOT of time. But I think it's kinda worth it.