2020-12-03 01:13 AM
I need just measuring current and voltage of 24 batteries
and accoring to datas, some actions should be taken(stop motor drive,starting of fans vsvsvs)
I used,keil microvision,,ATOLLIC true studio, and also Cube IDE
But, I always have problems with libraries(atollic-standart library and CUBE-IDE-hal library)
Therefore I use bare metal coding, looking with reference manuel and writing to registers like ,,,
RCC->APB2ENR |=0x00000100;
ADC1->CR1 |=0x02000000;
but it is also become a complicated think
,,,,,,
Do you have any suggestion for bare metal coding, because I do not see examples ,people usually use hal library or standard library,
or is there any supervisor who you know
also, is there any suggestion or better option of IC for Battery Management unit rather than stm32 family,
Regards
2020-12-03 01:30 AM
> RCC->APB2ENR |=0x00000100;
> ADC1->CR1 |=0x02000000;
That's exactly what I woud not do.
ST has published extensive device headers with typedefs for all peripherals and all associated constants.
For the F407, you could even use the "old" SPL headers, they are as good as the Cube or LL one's for that purpose.
In your case, this would be stm32f4xx.h.
And the SPL packages contain examples and library code you could use as templates for your application.
Without all the Cube/HAL ballast.