XMC4400 - Cannot read register after de-asserting reset from VADC

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

cross mob
lock attach
Attachments are accessible only for community members.
User7282
Level 4
Level 4
I'm using a Hexagonal XMC4400 board (XMC4400 F100K512) and I cannot read the register BFLNP from the ADC groups when I de-assert the peripheral reset.

I also noted that in the debugger the register value is 0, instead of the expected default value, 0xFFFF.

Am I doing something wrong?

Here is my test project:
0 Likes
9 Replies
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Hi,

I tested your code. However I did not find any reset and both the local variables are updated accordingly.


1862.attach
0 Likes
User7282
Level 4
Level 4
The expected value should be 0x0000FFFF and not 0xFFFFFFFF, right?

I tested with two different boards, so I think that the problem can be with the software. I'm using the most recent version of DAVE4 and when I execute the statements after the reset I always get this:

1863.attach
0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Hi,

I tested 2 boards (AA step and AB step). The XMC44 in AA step (As shown above) will not result in a TRAP however AB step will caused a TRAP.
0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
We got to check on this.
0 Likes
User7282
Level 4
Level 4
Right. I'm testing in the AB step.
0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Hi apereira,

I guess that the sequence to read BFLNP is incorrect which i am trying to clarify. May I know if it is necessary for you to read BFLNP after XMC_SCU_RESET_DeassertPeripheralReset or do you happen to find this issue?


XMC_SCU_RESET_DeassertPeripheralReset(XMC_SCU_PERIPHERAL_RESET_VADC);

b = VADC_G0->BFLNP;
0 Likes
User7282
Level 4
Level 4
Hello,

I happened to find the issue. I was trying to configure an application with the boundary flag for XMC4400 that writes to BFLNP at some point and my code always stopped when configuring the register, so I tried to see what was wrong.

First I tried to move the function to some other point of the code, with no success. Then I read the reference manual but I did not see any protection bits or any kind of sequence of initialization, so I just removed code until I came to this. I also checked in the debugger and the default value for the register is 0, instead of 0xFFFF at initialization.
0 Likes
User7282
Level 4
Level 4
Hello Travis,

Do you know what could be the issue with this?
0 Likes
User18566
Level 1
Level 1
Seems this register cannot be read, it results in a Bus Fault. Write access doesn't give a Bus Fault. At this moment, I haven't verified that the written values actually work... but i guess they do, otherwise it should be noted in the errata.
REMARK: The XMC peripheral library also fails on this point because the function XMC_VADC_GROUP_SetBoundaryEventInterruptNode() reads the contents of the register to merge it with the new value.
0 Likes