2024-08-30 08:08 AM
Hello,
In my STM32F407 discovery board, I want to run can communication for which firstly I set the INRQ bit CAN_MCR register then my INAK bit in CAN_MSR register is also got set by the hardware. Then for starting the can I want to clear the initialization mode in CAN_MCR register in which my INAK bit didn't got clear which is supposed to got clear. In the CAN_MSR register there is RX register is got cleared by the hardware which is also supposed to get set. Is it affect my Can start part or not.
Kindly help me in this part.
REG_RMW32(CAN_MCR_ADDR32,CAN1_INRQ_MASK,MCR_INRQ_SET);
//delay(1000);
while ((REG_READ32(CAN_MSR_ADDR32) & CAN_MSR_INAK) == 0U)
I have set the INRQ bit without using delay then my INAK bit got set.
// Request to leave initialization modeREG_RMW32(CAN_MCR_ADDR32,CAN1_INRQ_MASK,MCR_INRQ_RESET);
// Wait until initialization mode is exited
while ((REG_READ32(CAN_MSR_ADDR32) & CAN1_INAK_MASK) != 0U)
In this part I want to clear the INRQ bit but my INAK bit didn't got clear.
B.R
Rohit Kumar