Using STM32 hardware peripherals on Portenta

I have a couple of STM32H7 boards here -

one is the Portenta, one is the STM32H7-DISCO from ST.

I want to start using the ADC / DAC / DMA paths of the chip.

A good starting demo would be "play a sinewave out of the DAC using circular DMA while CPU does nothing" and there are plenty of STM32 HAL based demos to do that on the web.

so which routes are available to bring that type of code to Portenta ?

Is it as simple as bringing over the source and headers from STM IDE land and putting them in an Arduino project?

On Arduino+mbedOS on H7, is there a set of lower level API's for configuring MCU peripherals like these ?

I am looking at the same issues Portenta or STM discovery board . I think you could on theory could configure the STM Cube Mx to programme the Portenta. But you would have to reproduce all the pin assignments and settings. And then use an external programmer.

I might be easier to just jump in the the ST cube infrastructure except ST cube is a bit more complex to get going for someone used to programming Arduino. But at least there are lots of examples, documentation and training on the ST website.

I must say I have been testing touchgfx and it looks fantastic. This alone might make it worth switching to the ST discovery cards. It makes really good use of the graphics accelerator.

I think it's early days for the Portenta And the documentation at this stage is somewhat lacking, compared to STs, Sparkfun and Adafruit. The Pro IDE is commingnon fast but still has lots of bugs.

I am still on the fence which way to go with our product development. But for now the ST ecosystem it ahead.

This link might provide a general idea of how to go about it. Haven't tried it yet.