Example MPC5777C MCAN simpleTXRX GHS616

Showing results for 
Search instead for 
Did you mean: 

Example MPC5777C MCAN simpleTXRX GHS616

No ratings

Example MPC5777C MCAN simpleTXRX GHS616

* Detailed Description:
* Configures the MCANs to transmit and receive a CAN message.
* In this config, MCAN_0 transmits a message. MCAN_1 receives the message.
* MCAN_0 sends message each 1sec. This interval is generated by PIT.
* Single TX buffer is used to send n bytes. The message ID is changed for each
* transmission. Two standard and 2 extended IDs are sent.
* MCAN_1 is configured to receive a message, SW polling is used.
* There are 2 standard and 2 extended ID filter tables defined. Classic filter
* configuration is set, means filter ID & mask.
* Messages with matched standard ID are received into RXFIFO_0, messages with matched
* extended ID then stored in RXFIFO_1.
* EVB connection:
* J37 and J38 to position 2-3 to connect MCAN1 TX/RX to transceiver
* CAN0-CANH on P15-1 to CAN1-CANH on P14-1
* CAN0-CANL on P15-2 to CAN1-CANL on P14-2
* ------------------------------------------------------------------------------
* Test HW:         MPC5777C-512DS Rev.A + MPC57xx MOTHER BOARD Rev.C
* MCU:             PPC5777CMM03 2N45H CTZZS1521A
* Fsys:            PLL1 = core_clk = 264MHz, PLL0 = 192MHz
* Debugger:        Lauterbach Trace32
* Target:          internal_FLASH
* Terminal:        19200-8-no parity-1 stop bit-no flow control on eSCI_A
*           use USB connector (J21) on minimodule
* EVB connection:  ETPUA30 (PortP P23-15) --> USER_LED_1 (P7-1)
*                  ETPUA31 (PortP P23-14) --> USER_LED_2 (P7-2)

Labels (1)

Hello Petr, can you help me about a first experiment with your code?

I 'm trying to load the .elf attached into your zip and I note that no activity is present on PIN CAN TX of the uP.

Analyzing the code with trace32 I see that for a first time the microprocessor find  MCAN_0.TXBRP.R=0 and it will execute the code here reported (it is your), but no activity I see in the CAN TX PIN of UP...and after this iteration at the next iteration it will be alwasy find MCAN_0.TXBRP.R=1.

if (MCAN_0.TXBRP.R == 0)

     ....code of your example

    MCAN_0.TXBAR.R = 0x1; // start transmission for M_CAN0 TX buffer 0

Have you any ideas?

I must say that my sample of uP is marked as SPC5777CK3MME3....i.e. I think it has a very old version of chip.

Thanks in advance...and best regards.

Hi Petr,
                Just went through your example code and I noticed you had  mpc577xC.h file. Was this generated file  given by NXP, if yes can you please point me from where you got it ?

Hello Petr,

I cannot receives any  CAN-Message with your code. I use the MPC5777C-516DS evaluation board. I copy and paste your code in the SingleTogglePin example .

Please can you tell me what is wrong in my case ?

Version history
Revision #:
1 of 1
Last update:
‎09-20-2016 02:33 AM
Updated by: