Example MPC5748G FlexCAN RXFIFO DMA SDK303 S32DS21

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

Example MPC5748G FlexCAN RXFIFO DMA SDK303 S32DS21

Example MPC5748G FlexCAN RXFIFO DMA SDK303 S32DS21

/********************************************************************************
Detailed Description:

Configures the FlexCAN 0 to transmit and receive a CAN message
Baudrate to is set to 500kbps.

In this config, RXFIFO is used to receive a messages. 8 filter elements
are defined in the RXFIFO table. Both standard and extended IDs are used.
DMA is enabled in component inspector to read RXFIFO.

MB9 is moreover used to receive a message with given standard ID and
MB8 is used to transmit a message upon buttons press.

The callback function is installed as well and is it called each time message is
received in MB9, RXFIFO or message is transmitted.


* ------------------------------------------------------------------------------
* Test HW: DEVKIT-MPC5748G
* MCU: PPC5748GSMKU6 0N78S
* Target: Debug_FLASH
* EVB connection: PCAN-View with PCAN-USB Pro connected to CAN port P5
* Compiler: S32DS.Power.2.1
* SDK release: S32_SDK_S32PA_RTM_3.0.3
* Debugger: OpenSDA, Lauterbach Trace32
********************************************************************************
Revision History:
Ver Date Author Description of Changes
1.0 02-May-2023 Petr Stancik Initial version, based on SDK demo example
*******************************************************************************/
Attachments
%3CLINGO-SUB%20id%3D%22lingo-sub-1643033%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EExample%20MPC5748G%20FlexCAN%20RXFIFO%20DMA%20SDK303%20S32DS21%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1643033%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CPRE%3E%2F********************************************************************************%3CBR%20%2F%3EDetailed%20Description%3A%3CBR%20%2F%3E%3CBR%20%2F%3EConfigures%20the%20FlexCAN%200%20to%20transmit%20and%20receive%20a%20CAN%20message%3CBR%20%2F%3EBaudrate%20to%20is%20set%20to%20500kbps.%3CBR%20%2F%3E%3CBR%20%2F%3EIn%20this%20config%2C%20RXFIFO%20is%20used%20to%20receive%20a%20messages.%208%20filter%20elements%3CBR%20%2F%3Eare%20defined%20in%20the%20RXFIFO%20table.%20Both%20standard%20and%20extended%20IDs%20are%20used.%3CBR%20%2F%3EDMA%20is%20enabled%20in%20component%20inspector%20to%20read%20RXFIFO.%3CBR%20%2F%3E%3CBR%20%2F%3EMB9%20is%20moreover%20used%20to%20receive%20a%20message%20with%20given%20standard%20ID%20and%3CBR%20%2F%3EMB8%20is%20used%20to%20transmit%20a%20message%20upon%20buttons%20press.%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20callback%20function%20is%20installed%20as%20well%20and%20is%20it%20called%20each%20time%20message%20is%3CBR%20%2F%3Ereceived%20in%20MB9%2C%20RXFIFO%20or%20message%20is%20transmitted.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E*%20------------------------------------------------------------------------------%3CBR%20%2F%3E*%20Test%20HW%3A%20DEVKIT-MPC5748G%3CBR%20%2F%3E*%20MCU%3A%20PPC5748GSMKU6%200N78S%3CBR%20%2F%3E*%20Target%3A%20Debug_FLASH%3CBR%20%2F%3E*%20EVB%20connection%3A%20PCAN-View%20with%20PCAN-USB%20Pro%20connected%20to%20CAN%20port%20P5%3CBR%20%2F%3E*%20Compiler%3A%20S32DS.Power.2.1%3CBR%20%2F%3E*%20SDK%20release%3A%20S32_SDK_S32PA_RTM_3.0.3%3CBR%20%2F%3E*%20Debugger%3A%20OpenSDA%2C%20Lauterbach%20Trace32%3CBR%20%2F%3E********************************************************************************%3CBR%20%2F%3ERevision%20History%3A%3CBR%20%2F%3EVer%20Date%20Author%20Description%20of%20Changes%3CBR%20%2F%3E1.0%2002-May-2023%20Petr%20Stancik%20Initial%20version%2C%20based%20on%20SDK%20demo%20example%3CBR%20%2F%3E*******************************************************************************%2F%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎05-02-2023 04:36 AM
Updated by: