Closed ChrisIdema closed 4 years ago
Thanks for the tip and the workarounds. I intended the lib to be used with STM32Cube. It (to my knowledge) defines F_CPU, creates tim.h and the other symbols.
The attachTimerInSync error is weird, the blinky code should be valid. Can you copy the full error message?
Did you check the project_setup_with_cubemx
example? It ensures that headers, includes and code generation are set up properly.
Maybe it is a compatibility issue of STM32Cube between CPUs? (I use Nucleo F303RE.)
I've found other issues, but found out for some reason my platformio pulled a really old version of your library. That was the cause of several issues such as the missing attachTimerInSync and an overflow bug (which you have fixed already). For the AutoReloadPreload member of the struct I compared all stmcube processors and only the STM32F4 doesn't have that member. I've submitted a pull request for the fix. As for the F_CPU. Platformio creates a global define for F_CPU and it uses the board value as far as I know. I don't know if stmcubemx can override it. If you merge it I will consider the issue solved.
If I understand correctly PR #2 fixed this.
If I understand correctly PR #2 fixed this.
Correct
I use the nucleo F446ZE. I cannot get the example to build without modifications to my own code (I did not change the library code). I had the following issues:
I had to do the following:
It should also be possible to change F_CPU in the ini file with
board_build.f_cpu
With these modifications it works.