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

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User15596
Level 2
Level 2
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.

3380.attach
0 Likes
8 Replies
User15596
Level 2
Level 2
Added development.

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



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?
0 Likes
User15596
Level 2
Level 2
Nothing?

About the same I've gotten back from Infineon on the official support emails too 😕
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
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.

3237.attach

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
0 Likes
User15596
Level 2
Level 2
Any update from Keil on this?
0 Likes
Eric1
Employee
Employee
Hi S R,

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

Regards,
Eric
0 Likes
User15596
Level 2
Level 2
Eric,

Any update to this? We're working on something and Sleep Mode registers are not readable because they are 16bit.
0 Likes
User15596
Level 2
Level 2
Should I open a ticket for this on the DAVE/Debugger support side?
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

The pre-release of Keil MDK v5.27, http://www2.keil.com/mdk5/527pre, solves the issue.

Regards,
Jesus
0 Likes