2018-05-03 09:02 AM
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], #4LoopFillZerobss:
ldr r3, = _ebss cmp r2, r3 bcc FillZerobss Note: this post was migrated and contained many threaded conversations, some content may be missing.Solved! Go to Solution.
2018-05-04 09:18 AM
Hi Clive,
I think I messed up running stm32l4a6vgt code on Nucleo-144 which is a STM32L496.
We are using
stm32l4a6vgt MCU but get a Nucleo-144 board.
Thanks,
Dick
2018-05-03 02:28 PM
Your description and code is not super helpful at identifying the issue, bit too top level and vauge. Don' t really see how it would end up in the FillZerobss code.
Is it stuck in the Error_Handler, Default_Handler or HardFault_Handler?
Perhaps get a better debugger/tool-chain so you can resolve more precisely the instructions causing the error/exception
2018-05-04 09:18 AM
Hi Clive,
I think I messed up running stm32l4a6vgt code on Nucleo-144 which is a STM32L496.
We are using
stm32l4a6vgt MCU but get a Nucleo-144 board.
Thanks,
Dick
2018-05-16 05:30 PM
Hi,
I am seeing the issue now and have been struggled to figure out what's the issue for couple of days and several PCs.
Here is the info
- config
Nucleo-144
TrueStudio v9.0.1
STM32CubeMX 4.25.1
I am using Cube to generate the code for STM32L496. To make it simple, there is only USART1 mode set to Asynchronous. Nothing else is enabled.
The main() listed below. It's pretty straight forward.
The issue is when I use TrueSTUDIO to step into the HAL_UART_Init
(), it never return to the MX_USART1_UART_Init(). It's doesn't seem the MX_USART1_UART_Init() get the caller address right. But the program not hung, if I click suspend. It just waiting in the main::MX_USART1_UART_Init() function.
If I comment MX_USART1_UART_Init() out, will be the MX_GPIO_Init() never return to main.
Another weir thing is when I F6 step over, it's jumping around source code, not step over 1 line of code.
I haven't seen this in any IDE GDB debugger at all. And no clue at all what's happening.
Any ideas what might went wrong?
int main(void)
{ HAL_Init();SystemClock_Config();
MX_GPIO_Init();
MX_USART1_UART_Init(); while (1) {}
}Thanks,
Dick
2018-05-16 05:43 PM
Ok, again top level code is of zero probative value.
I might look in HAL_UART_MspInit() in your project's stm32l4xx_hal_msp.c file for while(1) loops of death
2018-05-16 05:49 PM
No, HAL_UART_MspInit() is fine. It stuck in UART_CheckIdleState(). Thx
On Wed, May 16, 2018 at 3:44 PM, Clive One <st-microelectronics@jiveon.com>
2018-05-16 06:41 PM
For the code generate from Cube v4.25.0 (Cube v4.25.1 generated code with compiler errors) for Nucleo-144 board (with only USART1/2/3 enabled with all other defaults, it never return on HAL_RCCEx_PeriphCLKConfig() function.
Thanks,
Dick
2018-05-16 07:27 PM
I think I've mentioned before, I don't use CubeMX
2018-05-17 11:28 AM
Do we have ST support can help? Thx
2018-05-17 11:54 AM
This is primarily a user-to-user forum, for more involved engineering support you'd need to be a commercial customer of some merit.
For specific tool chain and debugging issues you might have to work through them yourself, or with a colleague. The HAL examples are generally a better starting point to get orientated with.