hi everyone!
I have successfully implemented the sending and receiving of felxray messages. I want to tx null-frame, but I have not been able to achieve this function. I have read the MC9S12XF512 Reference Manual, and set the CMT register to 0 according to the rules. However, I used the Flexray bus monitoring tool to observe the frame type and found that it is still a data-frame, not a null-frame. I want to ask how to modify a static frame single cache message to null frame?
If there is a code example to send flexray null frame messages using MC9S12XF, I would be extremely grateful.
following is the code I modified:
void Fr_clear_MB_interrupt_flag(uint8 Fr_buffer_idx)
{
volatile uint16 temp_value_1 = 0; // Temporary variable used for bit operation
volatile uint16 Fr_MB_registers_offset_add_temp; // Temporary offset adress of message buffer registers
// Temporary offset address of MB registers
Fr_MB_registers_offset_add_temp = Fr_buffer_idx * 4;
// Clear Transmit Buffer Interrupt Flag
// Read MBCCSRn and select only necessary bits
temp_value_1 = (Fr_CC_reg_ptr[FrMBCCSR0 + Fr_MB_registers_offset_add_temp] & 0xF900);
temp_value_1 |= FrMBCCSR_MBIF; // Set MBIF flag - clear TX MB interrupt flag
/* change MBCCSRn.CMT to 0 */
temp_value_1 &= (~FrMBCCSR_CMT);
Fr_CC_reg_ptr[FrMBCCSR0 + Fr_MB_registers_offset_add_temp] = temp_value_1; // Clear Transmit Buffer Interrupt Flag
}