2016-04-26 11:03 AM
Hi,
I have configured CAN1 and CAN2 with CubeMX. The CAN1 Transmit and Receive in Polling works fine, but CAN2 appears not to work in Transmit, I have changed the handle in the working code from hcan1 to hcan2, the HAL_CANx_Init structure is the same, i.e Prescaler, SJW, BS1, BS2, etc. When configuring CubeMX it askes if CAN1 is master and CAN2 slave, does this mean that CAN2 can only receive or is different to CAN1. I am driving CAN into a PEAK unit for debug purposes. Help would be appreciated. KR John W2016-04-26 03:27 PM
On a F429 I use CAN2 for TX and CAN1 for RX and have never noticed any difference in capabilities between the two.
I don't use Cube though and my init code is basically the Keil demo.2016-04-27 01:19 AM
Thanks Tede,
I use Keil uVision, maybe crib the Keil code, think I will check my CAN2 driver, strange thing is I do not see any Data on the Tx pin. Thanks for your time KR John W