[Solved] Harmony CAN configuration
we all know that receiving is harder than sending regardless of the bus type. My Harmony 2.06 in the MPLabX5.30 is configured to generate PIC32MK0512GPE064 configuration code for its fourth CAN module. It does send CAN messages really nice.
Now I'm throwing messages at it while polling every millisecond DRV_CAN_ChannelMessageReceive(). It returns true in the very next moment after I have sent a CAN message into it. But the message is empty.
memset(data, 0, sizeof(data));
bool newMessageReceived = DRV_CAN_ChannelMessageReceive(appData.CANCommHandle, CAN_CHANNEL1, 0x000, 8, data);
is the same I use for sending, where it works.CAN_CHANNEL1
, I hope, refers to can channel 1, which is configured as CAN_RX_FULL_RECEIVE with a filter of 0x7fff and a mask 0.
The next zero
I don't know what else to put there.
is the buffer that still shows all zeros despite newMessageReceived being true.
Oh, and I did send not all zeros, btw.
What is it that I'm missing that will get CAN reception to work?
post edited by luker - 2020/08/26 03:06:53