Example FRDM-A-S32K344 FlexCAN TX_RX FreeRTOS S32DS36 RTD600

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Example FRDM-A-S32K344 FlexCAN TX_RX FreeRTOS S32DS36 RTD600

Example FRDM-A-S32K344 FlexCAN TX_RX FreeRTOS S32DS36 RTD600

 * =================================================================================================
 * Detailed Description:
 *
 * This example demonstrates Classical CAN and CAN FD reception and transmission using
 * interrupt-driven Message Buffers and FreeRTOS.
 *
 * FlexCAN0 is configured in Normal mode. MB0 receives standard-ID frames and MB1 receives
 * extended-ID frames. The FlexCAN callback copies every received frame into a FreeRTOS queue
 * and immediately rearms the corresponding RX Message Buffer.
 *
 * A dedicated FreeRTOS task waits for frames in the queue and echoes them through CAN TX MB2.
 * The transmitted frame preserves the received identifier type, identifier, payload length,
 * payload, CAN FD EDL state, and BRS state. The user LED is toggled after a transmit request
 * is accepted by the driver.
 *
 * Note:
 * FreeRTOS API functions such as xQueueSendFromISR() are used from the FlexCAN callback.
 * Therefore, the FlexCAN interrupt priority must comply with the FreeRTOS interrupt-priority
 * requirements defined by configMAX_SYSCALL_INTERRUPT_PRIORITY.
 *
 * =================================================================================================
 * Test HW:         FRDM-A-S32K344 (SCH-94921 / SPF-94921 Rev. C)
 * MCU:             S32K344
 * Compiler:        S32DS 3.6.x
 * RTD release:     S32K3_RTD_6_0_0_D2506_ASR_REL_4_7_REV_0000_20250610
 * Debugger:        On-Board Debugger
 * Target:          Internal_FLASH
 * Communication:   Classical CAN / CAN FD, STD and EXT ID, optional BRS
 * =================================================================================================
PetrS_0-1791201020537.png

 

PetrS_1-1791201028313.png

 

Attachments
%3CLINGO-SUB%20id%3D%22lingo-sub-2418429%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EExample%20FRMD-A-S32K344%20FlexCAN%20TX_RX%20FreeRTOS%20S32DS36%20RTD600%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2418429%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%0A%3CPRE%3E%3CFONT%20size%3D%222%22%3E%20*%20%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0A%20*%20Detailed%20Description%3A%0A%20*%0A%20*%20This%20example%20demonstrates%20Classical%20CAN%20and%20CAN%20FD%20reception%20and%20transmission%20using%0A%20*%20interrupt-driven%20Message%20Buffers%20and%20FreeRTOS.%0A%20*%0A%20*%20FlexCAN0%20is%20configured%20in%20Normal%20mode.%20MB0%20receives%20standard-ID%20frames%20and%20MB1%20receives%0A%20*%20extended-ID%20frames.%20The%20FlexCAN%20callback%20copies%20every%20received%20frame%20into%20a%20FreeRTOS%20queue%0A%20*%20and%20immediately%20rearms%20the%20corresponding%20RX%20Message%20Buffer.%0A%20*%0A%20*%20A%20dedicated%20FreeRTOS%20task%20waits%20for%20frames%20in%20the%20queue%20and%20echoes%20them%20through%20CAN%20TX%20MB2.%0A%20*%20The%20transmitted%20frame%20preserves%20the%20received%20identifier%20type%2C%20identifier%2C%20payload%20length%2C%0A%20*%20payload%2C%20CAN%20FD%20EDL%20state%2C%20and%20BRS%20state.%20The%20user%20LED%20is%20toggled%20after%20a%20transmit%20request%0A%20*%20is%20accepted%20by%20the%20driver.%0A%20*%0A%20*%20Note%3A%0A%20*%20FreeRTOS%20API%20functions%20such%20as%20xQueueSendFromISR()%20are%20used%20from%20the%20FlexCAN%20callback.%0A%20*%20Therefore%2C%20the%20FlexCAN%20interrupt%20priority%20must%20comply%20with%20the%20FreeRTOS%20interrupt-priority%0A%20*%20requirements%20defined%20by%20configMAX_SYSCALL_INTERRUPT_PRIORITY.%0A%20*%0A%20*%20%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0A%20*%20Test%20HW%3A%20%20%20%20%20%20%20%20%20FRDM-A-S32K344%20(SCH-94921%20%2F%20SPF-94921%20Rev.%20C)%0A%20*%20MCU%3A%20%20%20%20%20%20%20%20%20%20%20%20%20S32K344%0A%20*%20Compiler%3A%20%20%20%20%20%20%20%20S32DS%203.6.x%0A%20*%20RTD%20release%3A%20%20%20%20%20S32K3_RTD_6_0_0_D2506_ASR_REL_4_7_REV_0000_20250610%0A%20*%20Debugger%3A%20%20%20%20%20%20%20%20On-Board%20Debugger%0A%20*%20Target%3A%20%20%20%20%20%20%20%20%20%20Internal_FLASH%0A%20*%20Communication%3A%20%20%20Classical%20CAN%20%2F%20CAN%20FD%2C%20STD%20and%20EXT%20ID%2C%20optional%20BRS%0A%20*%20%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3C%2FFONT%3E%3C%2FPRE%3E%0A%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
Monday
Updated by: