Is the XMC_DEBUG print mechanism turning off interrupts and blocking other code?

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

cross mob
User20848
Level 1
Level 1
We have an XMC4200 project that prints via XMC_DEBUG, and we see on the oscilloscope that each print takes ~10mSec.

Also, it seems our CANbus receive interrupt is blocked during this 10mSec. If we get more than one CANbus message during the print time, it seems like it is missed.

We tried setting the CANbus receive interrupt priority to 5 (low), yet that did not help.

Is XMC_DEBUG() print wrapped in a critical section? Any thoughts on what to do about this?

If anyone wants details on how we implement XMC_DEBUG, please see the following PDF file and search for the word "print".

http://www.ma2life.org/doc/research/ma2/BuildingBus_Development_Guide.pdf

If anyone wants to see our project, which is free and open (anyone can copy any parts of this for free), they can download from here:

www.ma2life.org/doc/src/BB.zip
0 Likes
1 Solution
SudheeshK
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted
Hello,

Please refer our example projects "UART_EXAMPLE_XMC45" and "UART_XMC_Lib_XMC12" available from the following link for more details about using UART to print debug messages.
https://www.infineon.com/cms/en/product/promopages/aim-mc/dave_downloads.html

Thanks and Regards,
Sudheesh

View solution in original post

0 Likes
5 Replies
SudheeshK
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted
Hello,

Are you using semihosting feature to print log messages? Using simihosting to print log messages may cause CPU to miss interrupts.
Can you try using UART messages to print log messages instead of semihosting and see if you are observing the same issue?

Thanks and Regards,
Sudheesh
0 Likes
User20848
Level 1
Level 1
i am not sure how to use uart to print messages. where is there documentation on that? I am using semi-hosting. i think semihosting printing is using critical section and turning off interrupts.
0 Likes
SudheeshK
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted
Hello,

Please refer our example projects "UART_EXAMPLE_XMC45" and "UART_XMC_Lib_XMC12" available from the following link for more details about using UART to print debug messages.
https://www.infineon.com/cms/en/product/promopages/aim-mc/dave_downloads.html

Thanks and Regards,
Sudheesh
0 Likes
User20848
Level 1
Level 1
K Sudheesh,

Can you get us several free samples of XMC4200F64 IC? There are none at distributors and we want to build prototypes . We need 5 parts.

g
0 Likes
SudheeshK
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted
Hello,

You can contact your local Infineon sales team in your region for samples.
You can find Infineon distribution partners for your region from following link: https://www.infineon.com/cms/en/product/where-to-buy/

Thanks and Regards,
Sudheesh
0 Likes