Question
STM32F407 and LPC1788 ''CAN'' connection
Posted on March 18, 2015 at 11:42
I want to connect STM32f407 CAN to LPC1788 CAN.
I set baudrate to 125000 in STM32 with this spec:prtCan.Init.SJW = CAN_SJW_1TQ;
prtCan.Init.BS1 = CAN_BS1_13TQ;
prtCan.Init.BS2 = CAN_BS2_2TQ;
prtCan.Init.Prescaler = 21; and in LPC1788:
//Descriptions: CANx->BTR=(TSEG2<<
20
)|(TSEG1<<16)|(SJW<<14)|BRP
CANx->BTR=(1<<20)|(12<<16)|(0<<14)|29; CAN clock in stm32 is 42MHz and in LPC is 60MHz.
I set both clock to 2MHz with prescale 21 and
I can not communicate between these cores,I send a data [DLC=8] with STM32 to LPC and there is no receive on it and stm32 execution,stop in this line (for internal loop):
HAL_CAN_Transmit(&prtCan,5);
Is my configuration true?
Thanks.