STM32L433RBT6 with CudeIDE, the program jump to somewhere else if enable interrupt or stuck at HAL_init()
I am using the STM32L433RBT6 for some uart communication project.
My pcb only have STM32L433RBT6, LDO, LED, UART related circuit.
I am also using the Nucleo-L433RC-P (STM32L433RCT6 )for the development.
The Nucleo-L433RC is working fine for the LED4 and uart.
However, STM32L433RBT6 did not work on my pcb.
Therefore, I have create a simple LED switching program to test both hardware.
Only enable some GPIO and the Timebase Source set as TIM1 or TIM6 (Both tested and result are the same)
CODE:
int main(void)
{
/* USER CODE BEGIN 1 */
__disable_irq();
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
/* USER CODE BEGIN 2 */
__enable_irq();
while (1)
{
HAL_GPIO_TogglePin(LED_AC_GPIO_Port,LED_AC_Pin); // For STM32L433RBT6 prototype board
HAL_GPIO_TogglePin(LED_RS485_GPIO_Port,LED_RS485_Pin); // For STM32L433RBT6 prototype board
HAL_GPIO_TogglePin(LD4_GPIO_Port,LD4_Pin); // For Nucleo-L433 board
HAL_Delay(500);
}
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
The STM32L433RBT6 board is not working.
If without __disable_irq(), it wouldn't pass through the HAL_Init()
If with __disable_irq() and without __enable_irq(), it could go to HAL_Delay() and loop forever
If with __disable_irq() and with __enable_irq(), it will become "Break at address "0x1fff2dba" with no debug information available, or outside of program code."
Nucleo-L433RC-P is working fine of above code and the LED4 could blinking properly.
With and without __disable_irq() both are fine.
What's wrong could make this situation?
