cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Hardware Independent Development

smuryginim
Associate II
Posted on April 11, 2013 at 09:40

Hi, all!

I have some experience in development programs on stm32 microcontrollers, and want to do my programs more fluent and independent for using on microcontrollers of other series. Have anybody some good suggestions to od this, or maybe give me some usefull information about this issue? The method i found is to use some board.h file where there are definitions something like:

// USART#1 - to communicate with PC
//
#define GPIO_USART1_TX {GPIOA, {GPIO_Pin_9, GPIO_Speed_50MHz, GPIO_Mode_AF_PP} , Bit_SET}
#define GPIO_USART1_RX {GPIOA, {GPIO_Pin_10, GPIO_Speed_50MHz, GPIO_Mode_IN_FLOATING}, Bit_SET}

And how to init with this structure? Let's discuss #board.h #hardware-abstraction #stm32
3 REPLIES 3
Posted on April 11, 2013 at 10:26

''microcontrollers of other series''

Do you just mean other STM32 families, or also microcontrollers from other manufacturers?

Try googling ''Hardware Abstraction'' and ''Hardware Abstraction Layer'' and ''HAL'' and similar...

frankmeyer9
Associate II
Posted on April 11, 2013 at 11:54

And you could add ''ASF'' and ''StellarisWare'' to the search words, as this are older frameworks that do it that way.

I prefer the CMSIS method as exercised by ARM - laying a structure across the peripheral.

Those ''board.h'' file are rather messy IMHO ...

smuryginim
Associate II
Posted on April 11, 2013 at 12:39

Thank you, it is what i found.