XMC Crashes when setting GPIO MODE

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

cross mob
User16575
Level 1
Level 1
Micro controller: XMC 4200 F64x254

Issue: When Setting PC2 of P2_IOCR0 to General-purpose output ( 0b10000 ), my firmware crashes and the debugger disconnects.

Even setting the register directly in memory (0x 4802 8110 to 0x 80 0000 ) cause the firmware to crash(debugger disconnects and firmware seems to stop executing without entering an event handler).

Has anyone come across this issue before?

Russell P

EDIT: The register is P1_IOCR0, not P2_IOCR0 . (Port 1 pin 2)
0 Likes
5 Replies
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

Do you have connected P2.2 to some external component?

Regards,
Jesus
0 Likes
User16575
Level 1
Level 1
Its connected to the enable pin of a 3.3 Volt IC. We were able to circumvent the issue by connecting a different pin on the XMC 4200 to the enable pin of the IC.

Russell P
0 Likes
User16575
Level 1
Level 1
Any update on this ?
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

There is no problem setting the P1_2 to output mode.
3677.attach

Regards,
Jesus
0 Likes
User16575
Level 1
Level 1
Ran your code, and now things are functioning, which puts me at a loss for whats wrong. Ill continue to investigate. Thanks for your help.
0 Likes