Skip to main content
mt timothy
Visitor II
July 12, 2018
Question

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

  • July 12, 2018
  • 1 reply
  • 551 views
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.
Super User
July 13, 2018
Posted on July 13, 2018 at 17:18

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

-- pa