I have got it working as expected with the latest update. Thanks.
I am also close to finish I2C and ADC for Bluepill, perhaps you can help me test them when they are done.
I'll check them out when ready.
On a general point........
I did a quick hack of the STM32 C library to get the ADC working in a basic mode. I then discovered some cleaner conversions (namely unit stm32f103fw Jeppe Johansen, Bernd Mueller)
This unit does not cleanly compile using the FPC compiler tools you have released. I have tweaked some of it to get the ADC to work. I am assuming that it cleanly compiles with the official ARM compile releases. I do not want to keep re-inventing the wheel here.
So does your MBF framework provide a layer over the current STM32 library conversion ?
As it stands the MBF framework is basic in function and not comprehensive. This is not a criticism as I realise it is work in progress. I would want to extend/add bits when I need them in which case I would look to the STM32 library code.
Will your compiler changes feed back into the official FPC releases at some time ?
When adding a new bit of functionality, I would generally look at the C code examples around and take them as a guide.