cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX generated code doesn't run on STM32l496 Nucleo-144 board

Dick Lin
Senior
Posted on May 03, 2018 at 18:02

Hi,

I am using STM32CubeMX generated code run on Nucleo-144 board for STM32L496ZGT MCU. When I just have 3 UART enabled in cube, the code seems work fine. After I have added more components to the cube, the code go to an startup_stm32l4a6xx.s code. Seems a exception.

Here is the init code. The issue starting MX_LPUART1_UART_Init(). If I comment this out, will exception other init code too.

Any thoughts on this failure?

Thanks,

****

/* Initialize all configured peripherals */

MX_GPIO_Init();

MX_ADC1_Init();

MX_ADC3_Init();

MX_AES_Init();

MX_CRC_Init();

MX_HASH_Init();

MX_I2C1_Init();

MX_I2C2_Init();

MX_IWDG_Init();

MX_LPUART1_UART_Init();

MX_UART4_Init();

MX_UART5_Init();

MX_USART1_UART_Init();

MX_USART2_UART_Init();

MX_USART3_UART_Init();

MX_QUADSPI_Init();

MX_RNG_Init();

MX_RTC_Init();

MX_SPI1_Init();

MX_SPI2_Init();

MX_WWDG_Init();

/* Zero fill the bss segment. */

FillZerobss:

movs r3, #0

str r3, [r2], #4

LoopFillZerobss:

ldr r3, = _ebss

cmp r2, r3

bcc FillZerobss

Note: this post was migrated and contained many threaded conversations, some content may be missing.
10 REPLIES 10
Posted on May 24, 2018 at 18:33

I figured out it's the compiler optimization issue. After turn it off, then it works as expected. Thx