cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_CAN_GetTxMailboxesFreeLevel does not work with debug

matheuscaltran
Associate II

hi, I'm using a discovery stm32f429 together with the STM32CubeIDE

I would like to know why when I use while to wait for the mailbox:

while (HAL_CAN_GetTxMailboxesFreeLevel(&hcan1) != 3)
{
// Wait until all transmission buffers are free
}

the debug does not work and gives an error:

Failed to assign value 8000c69, to register 0
Failed to assign value 20000028, to register 0
Failed to assign value 2002fff8, to register 0
Failed to assign value 80011d4, to register 0

If I use the command HAL_CAN_GetTxMailboxesFreeLevel it works normally or if I use RUN it works normally on the board, but I would like it to work in debug to see some information through the STM32CubeIDE

1 ACCEPTED SOLUTION

Accepted Solutions

My understanding is you can have a global variable in expression not a function. 

View solution in original post

4 REPLIES 4
SRedd.5
Senior III

My understanding is when in debug mode some of the features like CAN may not work as the timing of the CAN protocol may expire.

Thanks for the answer. From the test I did, if I run the debug run(Resume) and put HAL_CAN_GetTxMailboxesFreeLevel in the live expression it gives this error

Screenshot_2.png

If I remove it from live expression to run (Resume) it works normally

Screenshot_3.png

Why does this happen is it a bug?

 

My understanding is you can have a global variable in expression not a function. 

matheuscaltran
Associate II

It seems like that's right, create a global variable being the function and it didn't give that error when reading the expression

matheuscaltran_0-1695760579366.png