cancel
Showing results for 
Search instead for 
Did you mean: 

STM32-MAT-TARGET Can not find which APB timer TIM1 is connected to.

antonio rueda
Associate II

Posted on February 04, 2018 at 11:08

Hi, I've been following the manual STM32-MAT/TARGET Hands On Rev 2.2 (see attached) and I am not able to get the timer 1 working (everything is working except this). I did everything like in the manual but when I load the .ioc file into simulink I get the next error:

♯♯♯ TIMERS_Config function : Can not find which APB timer TIM1 is connected to.Default preference value STM32TIMAPB set to APB1 is used.

I am using the STM32F767ZI nucleo.

Anybody knows how to solve this issue? Am I missing something?

Thanks in advance!

10 REPLIES 10
Posted on February 06, 2018 at 21:29

To generate the code for the peripherals I can only recommend to start with CubeMX, add the peripherals you need and generate a project for the toolchain of your choice. Some very basic code examples can also be found in the firmware package that CubeMX installs for your processor, but I would not try to compile those as-is, only use them as inspiration. If you need more details on a certain peripheral or function, look at the Reference Manual for the F767. With a decent IDE you can also easily trace through the code to learn what the libraries actually do.

When I generate the code from Simulink I basically just copy the *.c and *.h files over into the source directory created by CubeMX, and call the _initialize() and _step() functions created by Simulink from the C code. Apart from that you can treat the Simulink code pretty much like a black box.