Hi,
I have used CAN0 for Freemaster communication in S32K144,and it workes. Howerver, when I use CAN2 for Freemaster communication in S32K44, it doesn't work.
What I changed comparing to using CAN0 is below:
1,
#define FMSTR_CAN_BASE 0x4002B000UL /* FlexCAN2 base on S32K14x */
2,
CAN2->MCR |= (CAN_MCR_FRZ_MASK | CAN_MCR_HALT_MASK);
CAN2->MCR &= ~CAN_MCR_MDIS_MASK;
while((CAN2->MCR & CAN_MCR_FRZACK_MASK ) == 0){}
/* Disable abort mechanism MCR[AEN] = 0 */
CAN2->MCR &= ~CAN_MCR_AEN_MASK;
/* Enable the FlexCAN module */
CAN2->MCR &= ~(CAN_MCR_FRZ_MASK | CAN_MCR_HALT_MASK);
Would you like to point out where I maight wrong?
Thanks a lot!
I have solved the problem, that is because I opened one virual machine caused that the usb device no detected.