This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RTX51 CAN Example Program for the Infineon C515C: Problems

Hi, I'm attempting to compile the RTX51 CAN Example Program for the Infineon C515C example from the keil website without much success. I'm using the PK51 with full RTOS.

I import the uVision version 1 project following the instructions on importing files from uVision version1. I changed the TARGET_PROC to 515, as this is the chip I hope to use. I've checked the environment, changing the frequency to 16Mhz for the CAN timing calculations.

The project compiles without error, but unfortunately produces linker errors.

UNRESOLVED EXTERNALS:

***WARNING L1: UNRESOLVED EXTERNAL SYMBOL
	  SYMBOL: ?RTX_PAGE_OUT_REG
              MODULE: C:\KEIL\C51\LIB\RTX51.LIB (RTXINT)
However the RTX51.LIB is not included in the project files, and when I add it to the target files it produces the same error.

I noticed that in PROJECT – OPTIONS FOR TARGET that the code banking check box has been configured checked, with a value of 32 banks. However in the project files the L51_BANK.A51 is not included, it is my understanding that L51_BANK.A51 has to be included and configured correctly when using Code Banking. When I include this file and configure it for use with the RTOS and make it compatible with target device. I get the following errors:
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS
	 SYMBOL: ?B_CURRENTBANK
MODULE: L51_BANK.obj (?BANK?SWITCHING)
***ERROR L102: EXTERNAL ATTRIBUTE MISMATCH
	SYMBOL: ?B_CURRENTBANK
	MODULE: C:\…\RTX51.LIB (RTXCREA)
So I searched for ?B_CURRENTBANK and found it to be defined in RTXCONF.A51 and L51_BANK.A51. In RTXCONF.A51 it was defined as:
EXTRN DATA     (?B_CURRENTBANK)
What am I doing wrong? And why is there not a uVision 2 example from Keil?

  • I too have been experiencing difficulty with the CAN bus and would be appreciative of any answers to this question

  • First of all uncheck "code banking" box.
    Second, you're obviously using V7.0 RTX51 kernel and CAN examples were written for V5.0
    V7.0 introduced RTX_PAGE_OUT_REG variable, to allow cores (like Cygnal) which use other registers for paged XRAM access instead of P2.
    So, you'll have to add this lines:

    PUBLIC ?RTX_PAGE_OUT_REG
    ?RTX_PAGE_OUT_REG DATA 0A0H

    to your RTXCONFA51.INC file

    Locate this part:

    ELSEIF (?RTX_CPU_TYPE = 21)

    and just add those two lines and recompile.

    regards

    Dejan

    P.S. if you have troubles, contact me here:
    dilogic@zg.htnet.hr - I have A LOT of experience using RTX51 and CAN...

  • Just noticed a typo:
    when I said RTXCONFA51.INC it should
    actually be RTXCONF51.A51

    regards

    Dejan

  • Thanx Dejan,

    It works!!!!!! :0)

    And someone who knows what they are talking about...brillaint.

    I noticed that when you simulate it appears to get stuck, but when you transfer it to the dev board it runs fine.

    Thanx a lot.

    Carol-Anne

  • Hi

    I've been playing around with the RTX51 CAN Example Program for the Infineon C515C. I've hit a problem though, my send module increments the LEDs of the Phytec Development board, with the transmit pin flashing on and off. However as soon as I turn my receive module on, my transmit module stops transmitting. If I reset the two boards the transmit board still refuses to transmit.

    In the code I have set

     SENDER to 1 
    for the transmit module, and
     SENDER to 0 
    for the receive module. Both CANTIMING values are set the same. It seems almost as though the receive module is sending out an error message stopping the transmit module from transmitting.

    Thanx

    Carol-Anne

  • I suggest that you try demo program located in KEIL\C51\CAN\C515C folder. That one works for sure. If you cannot locate it, email me and I'll send it to you.

    regards

    Dejan ( dilogic@zg.htnet.hr )