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

C164, CA step CAN

Dear Sirs, Mr. Coppi!

...I use the CAN-Module of a CA-step. Because everything was fine using the Board, I burned it without looking at the errata sheed...I was surprised at the result!
Now I want to please You help me avoid another mistake.

The behavior can be avoided if a message object is not updated by software when a
transmission of the corresponding message object is pending (TXRQ element is set)
and the CAN module is active (INIT = 0).


Does that mean, if I would disable the CAN module each time I change something (data) in an object and enable it after that everything will be o.K.?

The nodes in the CAN system ignore the remote frame with the identifier=0 and no
data frame is triggered by this remote frame.


Is this another or additional possibility?
Is there a way to disable only the identifier '0'?

I'm not so sure if I did understand the errata well, so please don't wonder about this questions.

Do You know about a distributor who could have a flash device of the C164? (It's really expensive for me to burn them so often and this could prevent al least wrong startup configurations other mistakes which are not step-specific?!)

Thanks a lot for helping me
hannes

P.S. why differs the behaviour using the RAM of the Board instead of OTP??

Parents
  • ...tihs is the MAP contents of µVision debugger:

    MAP
    0x00000000 - 0x00000003 exec read
    0x00000004 - 0x00000007 read write
    0x00000008 - 0x0000000B exec read write
    0x0000000C - 0x00000011 read
    0x00000012 - 0x00000087 exec read write
    0x00000088 - 0x0000008B exec read
    0x0000008C - 0x0000009F exec read write
    0x000000A0 - 0x000000A3 exec read
    0x000000A4 - 0x000000AF exec read write
    0x000000B0 - 0x000005C9 exec read
    0x000005CA - 0x0000DFFF exec read write
    0x0000E000 - 0x0000E207 read write
    0x0000E208 - 0x0000FFFF exec read write

    Should write access be enabled benath address 0xF000?

    Bye

Reply
  • ...tihs is the MAP contents of µVision debugger:

    MAP
    0x00000000 - 0x00000003 exec read
    0x00000004 - 0x00000007 read write
    0x00000008 - 0x0000000B exec read write
    0x0000000C - 0x00000011 read
    0x00000012 - 0x00000087 exec read write
    0x00000088 - 0x0000008B exec read
    0x0000008C - 0x0000009F exec read write
    0x000000A0 - 0x000000A3 exec read
    0x000000A4 - 0x000000AF exec read write
    0x000000B0 - 0x000005C9 exec read
    0x000005CA - 0x0000DFFF exec read write
    0x0000E000 - 0x0000E207 read write
    0x0000E208 - 0x0000FFFF exec read write

    Should write access be enabled benath address 0xF000?

    Bye

Children
  • Hello Hannes,
    please try to better read the Manuals and the Datasheets; the C164, before step DA, has only 2K of RAM, located F600-FDFF. STOP.
    If you try to allocate segments in the space E000-E7FF, they are allocated into nowhere.
    Area F000-FFFF is the address area left by C164 designers to be internally used for Register and RAM, but this does not mean that it is ALL used; some registers are F000-F1FF, some others are FE00-FFFF; on some C16x derivatives, there is internal RAM from F200 to FDFF, on C164 is just 2K F600 to FDFF.

  • Dear Mr.Coppi-it's me again..
    Sorry, i became a little lazy knowing You are there kind of a speaking/writing book...
    but also did not think and know about the things that were done by KEIL ide automaticly case-tool-like...

    I looked at the manual v1.00 ( because CA-step is indexed by 8EM:
    The descriptions in this manual refer to the following derivatives of the C164-class:
    l C164CI-8EM Version with 64 KByte on-chip OTP memory
    ...correct??
    Following given addressranges i found:
    0x0000-0x8000 :lower 32kB OTP
    0xEF00-0xEFFF :CAN
    !!! is this wrong? You wrote:If you try to allocate segments in the space E000-E7FF, they are allocated into nowhere.!!!
    0xF000-0xF1FF :esfr
    0xFE00-0xFFFF :sfr
    0xF600-0xFDFF :RAM
    0xE000-0xF000 :XRAM + CAN !!!!!same question as above!!!!!!!!!

    (Does there exist exact tables of Memory organization for all the Steps?)

    These values i wrote into the Memory Map and tested. Programm "crashed" (error message appeared), because indirect addressed Memory at address 0xE200 was accessed.

    Looking at the device database the Memory is defined at these addresses:CPU=IRAM(0xF600-0xFDFF) XRAM(0xE000-0xE7FF) CLOCK(20000000) IROM (0-0xFFFF) ICAN(0xE800-0xEFFF) MOD167

    I could define a new C164CI_CA e.g. to avoid the wrong accesses, i think???! I'm sorry, but don't really know where to find the exact Memoryorganization of CA step. Please could You help again?
    hannes

  • I don't know anything about the C164 but for the C167, I had to enable the XRAM before I used it,

          MOV   XPERCON,#0403H    ; Enable CAN 1 and CAN 2 Xbus peripherals
    	                          ; Enable XRAM 2 KByte memory
    	                          ; Disable XRAM 6 KByte memory
          NOP
          NOP
    
          MOV   SYSCON,#8184H     ; Stack size = 512 words
                                  ; Internal rom starts at 00'0000
                                  ; Segmentation enabled
                                  ; Internal rom disabled
                                  ; BHE pin enabled
                                  ; Clock out pin enabled
                                  ; WR is write low, BHE is write high
                                  ; Xbus peripherals are enabled
                                  ; Xbus accesses are not visible on external bus
                                  ; Xbus peripherals not accessable on external bus

  • Dear Mr. Coppi!
    I changed a copy of the C164CI in the Data Base. Now it works in Flash too!! Sorry because my Questions were thoughtless- i'm a bit stressed at the time and was somewhere else...nevertheless i feel like asking You again to be sure if it's right, before i burn it.

    The Memory, i allocated in the Data Base, is this:

    0x0000-0xFFFF := internal ROM
    0xF600-0xFDFF := internal RAM
    0xE800-0xEFFF := CAN area

    no XRAM!!

    I wondered, because in every UM i found XRAM at E000-F000 (e.g.at System Memory Map)!?

    Would be nice if You answer me!?

    hannes

  • Hi Brad,
    the C164 is older than other C16x derivatives so the XPERCON register is not present, you just have a more generic bit XPEN in the SYSCON register used to enable/disable XRAM (when present) and CAN.

  • Hello Hannes,

    The correct memory map should be:

    0x00000-0x07FFF := internal ROM
    0x18000-0x1FFFF := internal ROM
    0x0F600-0x0FDFF := internal RAM
    0x0EF00-0x0EFFF := CAN area

    You wrote:

    I wondered, because in every UM i found XRAM at E000-F000 (e.g.at System Memory Map)!?

    That address area is just a 4K area left by Infineon designers for XPERIPHERALS; what REALLY IS inside that area depends on the C16x derivative, so you must consult the DATASHEET to have a precise indication about how that area is filled with peripherals. The USER'S MANUAL is GENERIC for the C164 family, the DATASHEET integrates the MANUAL with informations SPECIFIC to your C164 derivative (C164-CI 8EM).

    I think that your OTP has good chances to work correctly, this time, let me know.

    Ciao
    Bruno

  • Mr. Coppi!
    Good News at last!: After patching the Hardware everything works fine now!
    I'm really thankfull to You.
    I guess i need to post further Questions sometimes, and hope i again will hear from You!?

    Best regards hannes