Example S32R274 FlexCAN_with_Interrupts S32DS_1.1

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

Example S32R274 FlexCAN_with_Interrupts S32DS_1.1

Example S32R274 FlexCAN_with_Interrupts S32DS_1.1

********************************************************************************
* Detailed Description:
* Application performs basic initialization, setup PLL to maximum allowed freq.,
* setup clock for peripherals,
*
* Initializes the MCU including the FlexCAN peripherals.
* Configures the FlexCAN to transmit and receive a CAN message.
*
* Individual RX masking was added to the last version of this example.
* Three messages with different ID's are sent via FlexCAN_0 MB0 MB1 and MB2.
* These messages are received by FlexCAN_1 MB0, MB1 and MB2 according to masking
* register settings.
*
* For MB0 data receive is used interrupt.
*
*
* ------------------------------------------------------------------------------
* Test HW:         S32R274RRUEVB, MPC57xx Motherboard
* MCU:             S32R274KAMMM 1N58R
* Fsys:            PLL0 240MHz
*                    Z4 Core 120MHz
* Debugger:        Lauterbach Trace32
*                  PeMicro USB-ML-PPCNEXUS
* Target:          internal_FLASH (debug mode, debug_ram and release mode)
* EVB connection:
*
* It is necessary to remove both J35 jumpers.
*
*
* Connect J35.2 to PA14 (CAN_1 TX)
* Connect J35.4 to PA15 (CAN_1 RX)
*
* CAN0 is connected internally to J37 (this pin is placed on daughter card)
*
* Connect CAN P5.2 to J37.2 (CAN_1 and CAN_0 CANL)
* Connect CAN P5.1 to J37.1 (CAN_1 and CAN_0 CANH)
*
* This connection has to be observed, otherwise correct communication between
* CAN modules is not guaranteed.
*
*
********************************************************************************

Labels (1)
Attachments
%3CLINGO-SUB%20id%3D%22lingo-sub-1107707%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EExample%20S32R274%20FlexCAN_with_Interrupts%20S32DS_1.1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1107707%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E********************************************************************************%3CBR%20%2F%3E*%20Detailed%20Description%3A%3CBR%20%2F%3E*%20Application%20performs%20basic%20initialization%2C%20setup%20PLL%20to%20maximum%20allowed%20freq.%2C%3CBR%20%2F%3E*%20setup%20clock%20for%20peripherals%2C%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20Initializes%20the%20MCU%20including%20the%20FlexCAN%20peripherals.%3CBR%20%2F%3E*%20Configures%20the%20FlexCAN%20to%20transmit%20and%20receive%20a%20CAN%20message.%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20Individual%20RX%20masking%20was%20added%20to%20the%20last%20version%20of%20this%20example.%3CBR%20%2F%3E*%20Three%20messages%20with%20different%20ID's%20are%20sent%20via%20FlexCAN_0%20MB0%20MB1%20and%20MB2.%3CBR%20%2F%3E*%20These%20messages%20are%20received%20by%20FlexCAN_1%20MB0%2C%20MB1%20and%20MB2%20according%20to%20masking%3CBR%20%2F%3E*%20register%20settings.%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20For%20MB0%20data%20receive%20is%20used%20interrupt.%3CBR%20%2F%3E*%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20------------------------------------------------------------------------------%3CBR%20%2F%3E*%20Test%20HW%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20S32R274RRUEVB%2C%20MPC57xx%20Motherboard%3CBR%20%2F%3E*%20MCU%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20S32R274KAMMM%201N58R%3CBR%20%2F%3E*%20Fsys%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20PLL0%20240MHz%3CBR%20%2F%3E*%20%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Z4%20Core%20120MHz%3CBR%20%2F%3E*%20Debugger%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Lauterbach%20Trace32%3CBR%20%2F%3E*%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20PeMicro%20USB-ML-PPCNEXUS%3CBR%20%2F%3E*%20Target%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20internal_FLASH%20(debug%20mode%2C%20debug_ram%20and%20release%20mode)%3CBR%20%2F%3E*%20EVB%20connection%3A%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20It%20is%20necessary%20to%20remove%20both%20J35%20jumpers.%3CBR%20%2F%3E*%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20Connect%20J35.2%20to%20PA14%20(CAN_1%20TX)%3CBR%20%2F%3E*%20Connect%20J35.4%20to%20PA15%20(CAN_1%20RX)%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20CAN0%20is%20connected%20internally%20to%20J37%20(this%20pin%20is%20placed%20on%20daughter%20card)%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20Connect%20CAN%20P5.2%20to%20J37.2%20(CAN_1%20and%20CAN_0%20CANL)%3CBR%20%2F%3E*%20Connect%20CAN%20P5.1%20to%20J37.1%20(CAN_1%20and%20CAN_0%20CANH)%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20This%20connection%20has%20to%20be%20observed%2C%20otherwise%20correct%20communication%20between%3CBR%20%2F%3E*%20CAN%20modules%20is%20not%20guaranteed.%3CBR%20%2F%3E*%3CBR%20%2F%3E*%3CBR%20%2F%3E********************************************************************************%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1107707%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E********************************************************************************%3CBR%20%2F%3E*%20Detailed%20Description%3A%3CBR%20%2F%3E*%20Application%20performs%20basic%20initialization%2C%20setup%20PLL%20to%20maximum%20allowed%20freq.%2C%3CBR%20%2F%3E*%20setup%20clock%20for%20peripherals%2C%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20Initializes%20the%20MCU%20including%20the%20FlexCAN%20peripherals.%3CBR%20%2F%3E*%20Configures%20the%20FlexCAN%20to%20transmit%20and%20receive%20a%20CAN%20message.%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20Individual%20RX%20masking%20was%20added%20to%20the%20last%20version%20of%20this%20example.%3CBR%20%2F%3E*%20Three%20messages%20with%20different%20ID's%20are%20sent%20via%20FlexCAN_0%20MB0%20MB1%20and%20MB2.%3CBR%20%2F%3E*%20These%20messages%20are%20received%20by%20FlexCAN_1%20MB0%2C%20MB1%20and%20MB2%20according%20to%20masking%3CBR%20%2F%3E*%20register%20settings.%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20For%20MB0%20data%20receive%20is%20used%20interrupt.%3CBR%20%2F%3E*%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20------------------------------------------------------------------------------%3CBR%20%2F%3E*%20Test%20HW%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20S32R274RRUEVB%2C%20MPC57xx%20Motherboard%3CBR%20%2F%3E*%20MCU%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20S32R274KAMMM%201N58R%3CBR%20%2F%3E*%20Fsys%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20PLL0%20240MHz%3CBR%20%2F%3E*%20%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Z4%20Core%20120MHz%3CBR%20%2F%3E*%20Debugger%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Lauterbach%20Trace32%3CBR%20%2F%3E*%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20PeMicro%20USB-ML-PPCNEXUS%3CBR%20%2F%3E*%20Target%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20internal_FLASH%20(debug%20mode%2C%20debug_ram%20and%20release%20mode)%3CBR%20%2F%3E*%20EVB%20connection%3A%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20It%20is%20necessary%20to%20remove%20both%20J35%20jumpers.%3CBR%20%2F%3E*%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20Connect%20J35.2%20to%20PA14%20(CAN_1%20TX)%3CBR%20%2F%3E*%20Connect%20J35.4%20to%20PA15%20(CAN_1%20RX)%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20CAN0%20is%20connected%20internally%20to%20J37%20(this%20pin%20is%20placed%20on%20daughter%20card)%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20Connect%20CAN%20P5.2%20to%20J37.2%20(CAN_1%20and%20CAN_0%20CANL)%3CBR%20%2F%3E*%20Connect%20CAN%20P5.1%20to%20J37.1%20(CAN_1%20and%20CAN_0%20CANH)%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20This%20connection%20has%20to%20be%20observed%2C%20otherwise%20correct%20communication%20between%3CBR%20%2F%3E*%20CAN%20modules%20is%20not%20guaranteed.%3CBR%20%2F%3E*%3CBR%20%2F%3E*%3CBR%20%2F%3E********************************************************************************%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1107707%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EGeneral%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
No ratings
Version history
Last update:
‎01-10-2017 07:34 AM
Updated by: