Send more than 8 bytes over Standard CAN bus in STM32CubeIDE
Hi
I am trying to send more than 8 bytes over standard CAN Bus but I do not know how to do that. I know it must be possible but I tried different method but it didn't work.
I get three floating point values voltage, temperature and SOC. Each of them is 4 bytes so in total 12 bytes. I get the values from the main_function(dev_address) and send them to SendFloatsOverCAN(). here is my code:
void HAL_CAN_RxFifo0MsgPendingCallback(CAN_HandleTypeDef *hcan)
{
HAL_CAN_GetRxMessage(hcan, CAN_RX_FIFO0, &RxHeader, RxData); // data will be recieved from CAN_RX_FIFO0, the header will be stored in RxHeader, data will be saved in RxData
}
I can send and receive the first two floating point values but when I try to send the third one SOC it gets trouble. There must be a way to solve this problem, maybe using multiple message but I do not know how solve this. would be greatful if someone could explain a little bit with some lines of code.
