infineon4engineers Facebook

infineon@google+ Google+

infineon@linkedin linkedin

infineon4engi@twitter twitter

infineon@youtube youtube

+ Reply to Thread
Results 1 to 7 of 7

Thread: XMC1400 Keil can't read some SFR / Registers, mapping error?

  1. #1
    Beginner Beginner S R is on a distinguished road
    Join Date
    Aug 2018
    Posts
    12
    Points
    77.5

    XMC1400 Keil can't read some SFR / Registers, mapping error?

    I'm trying to figure out a clock issue we're having. The register I want to read is ANAOSCHPCTRL (analog oscillator high precision control).


    Two issues, seemingly related.



    1. When I use the register viewer in Keil, I see all the registers as options using the pull down to select a register. Some registers in that viewer window work well (CANNode, SCU_Clock, etc). Some peripherals show registers and locations, but no values, just always show zero value.

    I can manually read or write the values in code, so the headers are correct. I cannot read or set them using Keil's register window.

    The base address for SCU 0x4001'0000, I can see SCU_CLOCK registers in the peripheral register window at 0x4001'0314 and the values of it, but no values for 0x4000'1090 SCU_ANALOG for example.


    2. The MEMORY VIEWER window in Keil will not show anything in the 0x4000'0000 range. Instead of zeros or 0xFF or proper values I see "??" for each byte. I think these problems are related. Other memory access like 0x1000'0000 works.


    It's very difficult to debug without register values. I'm trying to figure out who is at fault here. Infineon or Keil. I'm guessing the XML-like config files defined for Keil are incorrect.

    Click image for larger version

Name:	KeilNoReadXMC1400.PNG
Views:	4
Size:	51.9 KB
ID:	3561
    Last edited by S R; Aug 17th, 2018 at 02:34 PM. Reason: Added picture

  2. #2
    Beginner Beginner S R is on a distinguished road
    Join Date
    Aug 2018
    Posts
    12
    Points
    77.5
    Added development.

    It seems when using SEGGER JLINK (the one on the board) that memory outside of certain regions does not READ.

    Attachment 3563

    Reading 4000'0300 (SCU_CLK or something around it) for 20 bytes OK and has data. Read same for 21 bytes: NO. No error description other than Could Not Read Memory.

    Reading 4001'1000 (SCU_ANALOG) for anything more than 2 bytes fails. 2 bytes shows the correct default value.


    IT SEEMS TO ME... that for some reason JLINK (not Keil) is only able to read specifc bytes from the chip. When Keil asks JLINK to show memory data it probably asks for 16+ bytes at a time, meaning the JLINK is probably telling Keil "could not read memory" and Keil shows this to me as "??". If I could somehow get Keil to read only 2 bytes, it seems that would work.

    Seems like default behavior should be that when memory can't be read by Segger that it still reports the things in can read. Could this be some memory protection that isn't being disabled in the startup file?

  3. #3
    Beginner Beginner S R is on a distinguished road
    Join Date
    Aug 2018
    Posts
    12
    Points
    77.5
    Nothing?

    About the same I've gotten back from Infineon on the official support emails too :\

  4. #4

    Infineon Employee
    Infineon Employee
    jferreira will become famous soon enough
    Join Date
    Oct 2012
    Posts
    441
    Hi,

    I was able to reproduce your issue. Although only in Keil MDK, using Ozone from Segger (which uses the same SVD file) the correct content of the registers is displayed.

    Click image for larger version

Name:	SCU_ANAOSCHPCTRL_Ozone.png
Views:	2
Size:	29.4 KB
ID:	3585

    It seems that Keil MDK is having some issues when accessing 16bit registers (???)
    We will contact Keil and inform you as soon as a solution is available.

    Regards,
    Jesus
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  5. #5
    Beginner Beginner S R is on a distinguished road
    Join Date
    Aug 2018
    Posts
    12
    Points
    77.5
    Any update from Keil on this?

  6. #6
    Intermediate Intermediate
    Infineon Employee
    Infineon Employee
    Eric is on a distinguished road
    Join Date
    Mar 2013
    Posts
    64
    Points
    496.171875
    Hi S R,

    Segger and Keil are informend and are working on an bugfix.
    We expect an answer soon.

    Regards,
    Eric
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  7. #7
    Beginner Beginner S R is on a distinguished road
    Join Date
    Aug 2018
    Posts
    12
    Points
    77.5
    Eric,

    Any update to this? We're working on something and Sleep Mode registers are not readable because they are 16bit.

+ Reply to Thread

Tags for this Thread

Disclaimer

All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.