8 years, 8 months ago.

Board compatibility, NUCLEO STM32F103 board?

I'm migrating from Arduino to STM32. And it's not without pain. I have a nucleo f411 board and some f103 boards on order. Need the QEI. Tried to compile but get the "#error directive: "CMSIS Target not recognised"" in file "lib/mbed/cmsis.h" The libs are up to date and I'm not compiling for LPC11U24! Not sure where to go from here. Will this run on a NUCLEO STM32F103 board?

Question relating to:

1 Answer

8 years, 8 months ago.

You might want to do a 'compile all' when moving a lib from another playform. However, QEI may be using platform specific registers/code that does not work on another platform without modifications.

I already tried "compile all."

posted by Mark Grass 12 Aug 2015

You can get the "#error directive: "CMSIS Target not recognised" when the mbed lib is outdated. Right click on the lib and select update, then compile all. I did a quick check and there is nothing platform specific in the QEI lib. It compiles for the F103 using this program:

#include "QEI.h"

Serial pc(USBTX, USBRX);
//Use X4 encoding.
//QEI wheel(p29, p30, NC, 624, QEI::X4_ENCODING);
//Use X2 encoding by default.
//QEI wheel (p29, p30, NC, 624);
QEI wheel (D7, D6, NC, 624);

int main() {

    while(1){
        wait(0.1);
        pc.printf("Pulses is: %i\n", wheel.getPulses());
    }

}
posted by Wim Huiskamp 12 Aug 2015