2023-05-22 10:32 PM
We have an STM32F469IG controller communicating with a similar one over CAN at 500K baud rate. The requirement is to change the baud rate while they are exchanging packets. We clear the SLEEP bit in CAN_MSR and set the INRQ bit. The hardware did not set the INAK bit. What could be the issue here?
Is it because at this baud rate, it is missing the 11 consecutive recessive bit sequence for the bus idle state?
2024-03-11 04:45 PM
I have the same problem on STM32 F103C8T6. I've tried with two different MCUs of the same kind and in both the fact that the hardware doesn't set the INAK bit causes the HAL_CAN_Init function to return the timeout error in the lines
/* Wait initialisation acknowledge */
while ((hcan->Instance->MSR & CAN_MSR_INAK) == 0U)
{
if ((HAL_GetTick() - tickstart) > CAN_TIMEOUT_VALUE)
{
/* Update error code */
hcan->ErrorCode |= HAL_CAN_ERROR_TIMEOUT;
/* Change CAN state */
hcan->State = HAL_CAN_STATE_ERROR;
return HAL_ERROR;
}
}
if you solved please let me know
2024-06-11 09:03 AM
Hello,
Yes it could be a missing 11 consecutive recessive bit sequence for the bus idle state.
If you disable the transmission of other nodes what happens?