You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Integrate the CAN files on the new repo (there are not all the ECSS functions enabled yet)
CubeMX tasks
FDCAN modules share the same message RAM, so find how many words are needed for the FDCAN1 to work properly. Use this number as an offset for the FDCAN2. Check here. We used 56 as an offset for FDCAN2 (I don't know why).
Check the clock calibration (we had it disabled)
Check/understand parameters like Nominal Sync Jump width, Data prescaler.
Main Tasks
Check functions like HAL_FDCAN_ErrorCallback(), HAL_FDCAN_ActivateNotification((&hcan, CAN_IT_RX_FIFO0_MSG_PENDING | CAN_IT_ERROR)...The last currently enables only the FDCAN_IE_RF0NE , FDCAN_IE_RF1NE flags...we should have more here.
The portYIELD_FROM_ISR(xHigherPriorityTaskWoken); inside the callback should be inside the else only...but outside the if
Validation Tasks
We should test the old code of COMMS with the updated code of the OBC
Findings: The FIFO 1 does not work nor in the old repo.
Other Tasks
Separate the receive and transmit tasks (maybe create a mutex for that)
References
Note: On a CAN bus, a frame is the basic unit of messaging. For a classic CAN bus, a frame consists of an 11-bit identifier along with an 8-byte message payload. For CAN FD, a frame is labeled with a 29-bit identifier and carries a 64-byte message payload.
* @example @code
* uint32_t id = 0x4; // Specify the sending Node ID.
* etl::vector<uint8_t, 8> data = {0,1,2,3,4,5,6,7}; // Specify an array of data, up to 64 bytes.
* CAN::Frame message = {id, data}; // Create a CAN::Frame object.
* CAN::Driver::send(message, Application::Main); // Use the included send function to send a message on the Main bus.
* @endcode
Files
Frame.hpp
CANDriver.hpp
TPProtocol.hpp
CANDriver.cpp
TPProtocol.cpp
CANGatekeeper.cpp
CANGatekeeper.hpp
Chore Tasks
CubeMX tasks
Main Tasks
HAL_FDCAN_ErrorCallback()
,HAL_FDCAN_ActivateNotification((&hcan, CAN_IT_RX_FIFO0_MSG_PENDING | CAN_IT_ERROR)
...The last currently enables only the FDCAN_IE_RF0NE , FDCAN_IE_RF1NE flags...we should have more here.portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
inside the callback should be inside the else only...but outside the ifValidation Tasks
Findings: The FIFO 1 does not work nor in the old repo.
Other Tasks
References
Note: On a CAN bus, a frame is the basic unit of messaging. For a classic CAN bus, a frame consists of an 11-bit identifier along with an 8-byte message payload. For CAN FD, a frame is labeled with a 29-bit identifier and carries a 64-byte message payload.
CAN-TP Protocol
https://controllerstech.com/stm32-fdcan-in-loopback-mode/
STM32 CAN Application Note
bit timing parameters
sos
The text was updated successfully, but these errors were encountered: