cancel
Showing results for 
Search instead for 
Did you mean: 

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

mt timothy
Associate
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
1 REPLY 1
Pavel A.
Evangelist III
Posted on July 13, 2018 at 17:18

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

-- pa