Access to low level functions on Photon [Resolved]

I’m new to the Photon solution and have an application in mind that requires 2 devices to use DMA to offload CPU cycles. I was hoping I could write my own library using the STM32F20xx Peripheral library. If this is not available I can code at the peripheral level as well provided the compiler environment supports a mix of .ino and low level .cpp or .c files (the library).

Will the compiler permit low level hardware register access and where can I find the peripheral library for the STM32F205 used in the Photon?

Thanks in advance,

What IDE are you using?
What exact calls are you looking for?

You should have access to some (most?) of the low level commands for the STM32F2x as is, but if you are missing things, you can always try the respective include <whatever.h>

The STM32Fxxx standard peripheral library usually just works from normal user firmware, assuming you’re not doing something that conflicts with the system.

In the audio3/audio3.cpp example here I use the ADC features of the standard peripheral library to set up the ADC using DMA to save the samples to a buffer automatically.


I took the liberty and altered your topic title to something more descriptive and moved your initial title into the post :wink:

1 Like

Great. This gives me a path to continue development. Thanks. There is more to learn here. It appears that Particle has their own peripheral library or perhaps C++ wrappers for the standard STM peripheral library.

1 Like

I see that your projects do not require a .ino file. This is because startup and loop which are Arduino hooks were implemented in your only source file. Personally I prefer this to trying to marry .ino applications with C/C++ custom libraries. Thanks again for your input.

1 Like

Thanks @rickkas7 @ScruffR for the help!

As usual I am lost to the big picture as I take in a new technology. At this point after using Build for 2 weeks I was able to get a driver up and running and I must say I am impressed. I am working on bringing up a couple of new products and I want to use Photon. It’s a great solution.