Skip to main content
mt timothy
Visitor II
Jul 12, 2018 6:57 PM UTC
Question

Can CubeMX generate multiple `MX_*_Init()` functions for the same peripheral with different settings?

Posted on July 12, 2018 at 20:57

I have a SPI device that I want to operate in 8-bit mode during configuration, but then switch over to running in 16-bit mode with DMA during normal operation.

Is there a way to get CubeMX to generate more than one MX_SPIx_Init() function so that I can re-initialize the peripheral between config and normal operation?

#configuration #cubemx #reinit
This topic has been closed for replies.

1 reply

Pavel A.
Jul 13, 2018 3:18 PM UTC
Posted on July 13, 2018 at 17:18

Not 'as is'. But you can create two projects with different setting, then copy & paste.

-- pa