STM32F407 CAN1: INAK not set in Keil µVision Simulator
STM32F407 CAN1: INAK not set in Keil µVision Simulator
I am implementing a bare-metal, polling-only CAN1 driver on an STM32F407VG in Keil µVision Simulator.
During CAN initialization:
CAN1->MCR.INRQ = 1;
while (CAN1->MSR.INAK == 0)
{
/* timeout */
}
MCR.INRQ successfully becomes 1, but MSR.INAK never changes from 0, so the program remains stuck in the loop.
I have verified:
-
STM32F407VG is selected and Use Simulator is enabled.
-
CAN1 clock is enabled (
RCC->APB1ENR bit 25 = 1). -
CAN1 register writes work; for example,
MCR.INRQandBTRfields update correctly. -
Manually setting
INRQ=1in the CAN1 peripheral window also does not causeINAKto become1. -
Similarly, setting
MCR.SLEEP=1does not causeMSR.SLAKto become1. -
TSR.TME0/TME1/TME2also remain0.
Is the CAN1 peripheral state-machine behavior (INRQ → INAK, SLEEP → SLAK, mailbox status, etc.) actually supported for the STM32F407VG in the Keil µVision simulator? Or is there a specific configuration required for these hardware-generated status bits to update?
Thanks.
